jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
yaneko has quit [Read error: Connection reset by peer]
rkazak has quit [Ping timeout: 276 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
yaneko has joined #commonlisp
amb007 has joined #commonlisp
gooba has quit [Remote host closed the connection]
gooba has joined #commonlisp
rkazak has joined #commonlisp
jon_atack has quit [Ping timeout: 246 seconds]
bjorkint0sh has joined #commonlisp
bjorkintosh has quit [Ping timeout: 276 seconds]
skin has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 272 seconds]
Thermoriax has joined #commonlisp
corvo_ry has joined #commonlisp
corvo_ry has quit [Changing host]
corvo_ry has joined #commonlisp
brokkoli_origin has joined #commonlisp
corvo_ry has quit [Remote host closed the connection]
dtman34 has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
dtman34 has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 244 seconds]
rendar has joined #commonlisp
<thuna`> At what point (and in which functions) are subforms macroexpanded?
rkazak has joined #commonlisp
<pillton> clhs 3.1.2.1.2
<mange> I don't really understand the question, but I believe macros are handed their arguments unexpanded, and the macroexpansion is itself expanded recursively.
<thuna`> mange: That's what I had assumed too, but the notes for MACROEXPAND and MACROEXPAND-1 says that they only expand immediate macros and don't recurse into their arguments
<mange> That is correct, but those methods are not the entirety of the macroexpansion process done by the evaluator/compiler.
<mange> ... methods. Ugh, I've been doing too much Ruby.
<thuna`> pillton: Where in there does it specify when the macroexpansion occurs?
<mange> MACROEXPAND and MACROEXPAND-1 expand at one level, but don't do the recursive bit.
<mange> Section 3.1.2.1.2.2 is the one for macro expansion: https://www.lispworks.com/documentation/HyperSpec/Body/03_ababb.htm
<ixelp> CLHS: Section 3.1.2.1.2.2
amb007 has quit [Ping timeout: 265 seconds]
<mange> It doesn't specify the recursive bit, either, because the recursion actually comes from the next section "Function Forms" where it says "The subforms in the cdr of the original form are evaluated in left-to-right order in the current lexical and dynamic environments."
<thuna`> Sorry, I meant macroexpansion of subforms. Though, the answer seems to be when you are evaluating the subforms, which I imagine would rule out recursive macroexpansion prior to evaluation as an option
<pillton> In my opinion, Section 3.1 of the hyperspec is arguably the most important section of the hyperspec.
<pillton> From Section 3.1: "Evaluation can be understood in terms of a model in which an interpreter recursively traverses a form performing each step of the computation as it goes."
jonatack has joined #commonlisp
<thuna`> ,(DEFPARAMETER *FOO* NIL) ,(DEFMACRO FOO () *FOO*) ,(LIST (SETF *FOO* T) (FOO))
<ixelp> (DEFPARAMETER *FOO* NIL) => *FOO* and (DEFMACRO FOO () *FOO*) => FOO finally (LIST (SETF *FOO* T) (FOO)) => (T T)
<thuna`> So, yeah, recursive macroexpansion just doesn't happen at all, it seems
<mange> Is there a question behind this question? What are you trying to do?
<pillton> thuna`: What were you expecting to happen? Can you use the pastebin to avoid the use of commas?
<thuna`> I have macros in my DSL, and I realized while writing tests that I didn't expand subforms, so took a look at SBCL's MACROEXPAND and then the CLHS and realized that MACROEXPAND wasn't _supposed_ to expand subforms. I thought that subforms _were_ expanded at some point, though, so when I couldn't find where that was happening I figured someone here might know.
<thuna`> Now I realize that I was mistaken about the whole thing
<mange> Do you want subforms to be expanded? The only reason to do so would be if your macro wants to inspect the result of a macroexpansion in a subform, right? Do you want/need to do that?
<thuna`> pillton: I was thinking (LIST (SETF *FOO* T) (FOO)) would macroexpand to (LIST (SETF *FOO* T) NIL) [because at this point *FOO* is NIL] and then that would evaluate as (T NIL)
<pillton> If you want to talk about macros, then I suggest you avoid talking about "macros in your DSL" as a domain specific language would have its own evaluation model which may or may not be the same as the evaluation model in common lisp.
<thuna`> mange: Some minor changes are needed but there's no reason why subforms have to expand in this situation. I was just caught off-guard a bit
<thuna`> pillton: Yes, it is a bit confusing to mix these together, sorry about that. I just wanted to provide the context.
<thuna`> I think(?) in this case I can just use CL's macro semantics.
<pillton> Your example (LIST (SETF *FOO* T) (FOO)) is very complicated because of the way you have specified the macro FOO.
<pillton> In fact that output of it will change depending on whether it is compiled first and then evaluated, or evaluated.
<pillton> I don't have the time to explain it in detail to you, but I suggest you spend some time on that example.
* thuna` is looking at 3.2.2.2
<thuna`> So if being interpreted it macroexpands as it evaluates and if being compiled it recursively macroexpands before any of it is evaluated
rkazak has quit [Ping timeout: 248 seconds]
jonatack has quit [Read error: Connection reset by peer]
<mange> Does the standard require evaluation to have that outcome? Or could the evaluator, if it wanted, do a "two-pass" evaluation by expanding all the macros first, and then evaluating the resulting forms?
<thuna`> Luckily for pure macros (which I assume is the majority) the distinction doesn't matter
<mange> It has performance implications. :)
<thuna`> EVAL explicitly calls `MACROEXPAND-1'-based macroexpansion, so I suppose it mustn't do two passes?
<thuna`> s/calls/uses/
<thuna`> Or maybe not, if EVAL is allowed to compile first
<thuna`> The glossary entry for "evaluation" seems to imply that it can, at least: "a conforming implementation might legitimately have only a compiler and no interpreter"
<thuna`> Though given I have SB-EXT:*EVALUATOR-MODE* as :COMPILE, I would have thought that my example would return (T NIL)
ando-ryuichi has joined #commonlisp
rkazak has joined #commonlisp
jonatack has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
akoana has quit [Quit: leaving]
puke has joined #commonlisp
yewscion has quit [Read error: Connection reset by peer]
yewscion has joined #commonlisp
yewscion has quit [Excess Flood]
yewscion has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
sandom-nick has quit [Ping timeout: 244 seconds]
JuanDaugherty has joined #commonlisp
rkazak has joined #commonlisp
josrr has quit [Remote host closed the connection]
knusbaum has joined #commonlisp
Pixel_Outlaw has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
JuanDaugherty is now known as ColinRobinson
knusbaum has quit [Ping timeout: 252 seconds]
<pillton> mange: Yes in the evaluation example since LIST is a symbol naming a function. From CLHS 3.1.2.1.2.3 have "The subforms in the cdr of the original form are evaluated in left-to-right order in the current lexical and dynamic environments".
ColinRobinson is now known as JuanDaugherty
Devon has quit [Ping timeout: 252 seconds]
JuanDaugherty is now known as ColinRobinson
knusbaum has joined #commonlisp
UncleRRR has joined #commonlisp
ColinRobinson has quit [Quit: ColinRobinson]
rkazak has joined #commonlisp
surabax has quit [Quit: Leaving]
rkazak has quit [Ping timeout: 265 seconds]
knusbaum has quit [Ping timeout: 248 seconds]
olnw has joined #commonlisp
dtman34 has quit [Ping timeout: 252 seconds]
knusbaum has joined #commonlisp
amb007 has joined #commonlisp
dtman34 has joined #commonlisp
amb007 has quit [Ping timeout: 244 seconds]
rkazak has joined #commonlisp
dtman34 has quit [Ping timeout: 252 seconds]
knusbaum has quit [Remote host closed the connection]
knusbaum has joined #commonlisp
dtman34 has joined #commonlisp
rkazak has quit [Ping timeout: 276 seconds]
gooba has quit [Remote host closed the connection]
gooba has joined #commonlisp
rkazak has joined #commonlisp
ando-ryuichi has quit [Remote host closed the connection]
UncleRRR has quit [Quit: Leaving]
Noisytoot has quit [Excess Flood]
Noisytoot has joined #commonlisp
edgar-rft` has joined #commonlisp
edgar-rft_ has quit [Ping timeout: 248 seconds]
rkazak has quit [Ping timeout: 272 seconds]
Noisytoot has quit [Ping timeout: 248 seconds]
Devon has joined #commonlisp
decweb has quit [Ping timeout: 248 seconds]
Noisytoot has joined #commonlisp
Devon has quit [Ping timeout: 244 seconds]
Noisytoot has quit [Excess Flood]
Noisytoot has joined #commonlisp
rkazak has joined #commonlisp
notzmv has quit [Ping timeout: 265 seconds]
nil78 has joined #commonlisp
pale has quit [Ping timeout: 265 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
rkazak has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
amb007 has quit [Ping timeout: 248 seconds]
knusbaum has quit [Ping timeout: 276 seconds]
amb007 has joined #commonlisp
Lord_Nightmare has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
shka has joined #commonlisp
amb007 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
pve has joined #commonlisp
rkazak has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 244 seconds]
rkazak has quit [Ping timeout: 244 seconds]
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
skin has quit [Ping timeout: 246 seconds]
u0_a1257 has joined #commonlisp
domovod has joined #commonlisp
u0_a1257 has quit [Client Quit]
reb has quit [Read error: Connection reset by peer]
reb has joined #commonlisp
Cymew has joined #commonlisp
rkazak has joined #commonlisp
bpanthi977 has quit [Ping timeout: 272 seconds]
zwr has quit [Read error: Connection reset by peer]
mishoo has joined #commonlisp
amb007 has joined #commonlisp
alfiee has quit [Ping timeout: 260 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
alfiee has joined #commonlisp
zwr has joined #commonlisp
bendersteed has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
pillton has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
mishoo has quit [Ping timeout: 244 seconds]
bpanthi977 has joined #commonlisp
notzmv has joined #commonlisp
bpanthi977 has quit [Ping timeout: 246 seconds]
mulk has quit [Read error: Connection reset by peer]
rkazak has joined #commonlisp
mulk has joined #commonlisp
varjag has joined #commonlisp
rkazak has quit [Ping timeout: 276 seconds]
bpanthi977 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 252 seconds]
rainthree has joined #commonlisp
apac has quit [Ping timeout: 244 seconds]
rkazak has joined #commonlisp
Th30n has joined #commonlisp
Guest96 has joined #commonlisp
bpanthi977 has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
bpanthi977 has quit [Ping timeout: 260 seconds]
bpanthi977 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 245 seconds]
rkazak has joined #commonlisp
mishoo has joined #commonlisp
bpanthi977 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 248 seconds]
rkazak has quit [Ping timeout: 245 seconds]
bpanthi977 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 276 seconds]
bpanthi977 has joined #commonlisp
ingeniot has joined #commonlisp
bpanthi977 has quit [Ping timeout: 272 seconds]
rkazak has joined #commonlisp
liminality has joined #commonlisp
<liminality> hi all
<liminality> does anyone know marco heisig's irc name? i'm wanting to know what dll dependencies his cl-isl package has
<phoe> heisig
<ixelp> cl-isl/swig/prologue.lisp at 6b6214b213db42a96261ed03b12d2251b409018d · marcoheisig/cl-isl · GitHub
<liminality> perfect, thanks :)
bpanthi977 has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
bpanthi977 has quit [Ping timeout: 260 seconds]
kaskal has quit [Quit: ZNC - https://znc.in]
kaskal has joined #commonlisp
rkazak has joined #commonlisp
no-name has joined #commonlisp
rkazak has quit [Ping timeout: 264 seconds]
bpanthi977 has joined #commonlisp
rkazak has joined #commonlisp
bpanthi977 has quit [Ping timeout: 276 seconds]
xaltsc has quit [Quit: WeeChat 4.5.1]
decweb has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
bendersteed has quit [Quit: bendersteed]
bendersteed has joined #commonlisp
sandom-nick has joined #commonlisp
ingeniot has quit [Ping timeout: 240 seconds]
liminality has quit [Quit: Leaving]
bpanthi977 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 260 seconds]
rkazak has joined #commonlisp
beagles has joined #commonlisp
bpanthi977 has joined #commonlisp
rkazak has quit [Ping timeout: 246 seconds]
josrr has joined #commonlisp
mange has quit [Quit: Zzz...]
surabax has joined #commonlisp
rkazak has joined #commonlisp
ebrasca has joined #commonlisp
qesat60 has joined #commonlisp
sandom-nick is now known as random-nick
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
rkazak has quit [Ping timeout: 264 seconds]
Robinette911363 has joined #commonlisp
Robinette911363 has quit [Ping timeout: 252 seconds]
Inline has quit [Remote host closed the connection]
ingeniot has joined #commonlisp
JoeBiden364920 has joined #commonlisp
<JoeBiden364920> Hey guys... Joe Biden here. I've decided to step down from the White House to focus on other projects. Billionaires are a threat to democracy, so check out https://BidenCash.st to put them in the bullseye. Keep an eye on the CNN inauguration for a promo code!
Th30n has quit [Quit: going off]
cdegroot has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
cdegroot has joined #commonlisp
cdegroot has quit [Remote host closed the connection]
JoeBiden364920 has quit [Ping timeout: 265 seconds]
Inline has joined #commonlisp
rkazak has joined #commonlisp
cdegroot has joined #commonlisp
bpanthi977 has quit [Ping timeout: 276 seconds]
rkazak has quit [Ping timeout: 248 seconds]
basicnpc has joined #commonlisp
<basicnpc> We have ansi-test to test standard CL. How about MOP/CLOS?
<Colleen> really need to)
<Colleen> basicnpc: phoe said at 2025.01.06 22:26:00: in order to make a cl-style condition system in any language, you need dynamic binding (if you have any equivalent of unwind-protect, you can implement them yourself), non-local returns (throwing and exceptions as understood in C++ will do), and lexical closures (mostly for efficiency; you can do without, if you
<younder> How do exceptions react to multiple thread environment? Wont they always advance down the call stack of the recipient that throws the exception?
<beach> younder: Are you talking C++ here?
<younder> No
<beach> younder: Then what?
<bike> we have conditions, not exceptions. and signaling a condition is basically thread local, yes.
<younder> So errors came far from where thet originated.
<younder> s/thet/they/
<bike> i don't know what that means.
<basicnpc> Question 2: Why isn't the class STANDARD-OBJECT a superclass of the class FUNCTION? Shouldn't each function instance be a standard-object instance? (http://metamodular.com/CLOS-MOP/graph.png)
<basicnpc> (I read log.)
basicnpc has left #commonlisp [Using Circe, the loveliest of all IRC clients]
<beach> basicnpc: 1. I am unaware of any standard test suite for MOP functionality.
prokhor has quit [Ping timeout: 272 seconds]
rainthree has quit [Ping timeout: 252 seconds]
<beach> basicnpc: In Clostrophilia, I created a subclass SIMPLE-FUNCTION which is a subclass of FUNCALLABLE-STANDARD-OBJECT and I use it for functions created by (FUNCTION (LAMBDA (...) ...), but perhaps that would be too radical a change at the time CLOS was introduced into pre-ANSI Common Lisp implementations.
<beach> younder: When a condition is signaled, a handler for it is search for, and the most recently established such handler is invoked. And, yes, the dynamic environment is involved, which is thread specific.
josrr has quit [Remote host closed the connection]
josrr has joined #commonlisp
rkazak has joined #commonlisp
bendersteed has quit [Quit: bendersteed]
prokhor has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
ingeniot has quit [Ping timeout: 240 seconds]
rkazak has joined #commonlisp
skin has joined #commonlisp
rkazak has quit [Max SendQ exceeded]
olnw has quit [Quit: ZNC - https://znc.in]
knusbaum has joined #commonlisp
knusbaum has quit [Quit: Leaving]
rkazak has joined #commonlisp
jon_atack has quit [Ping timeout: 244 seconds]
mountainman1312 has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 252 seconds]
bpanthi977 has joined #commonlisp
chomwitt1 has joined #commonlisp
amb007 has quit [Ping timeout: 244 seconds]
deadmarshal_ has quit [Remote host closed the connection]
amb007 has joined #commonlisp
halloy5924 has quit [Quit: halloy5924]
rkazak has joined #commonlisp
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
<jackdaniel> if cl were specified as multithreaded, then signal could accept an argument denoting the target thread to provide an interface for asynchronous interruptions
bpanthi977 has quit [Ping timeout: 276 seconds]
zwr has quit [Remote host closed the connection]
zwr has joined #commonlisp
bpanthi977 has joined #commonlisp
xaltsc has joined #commonlisp
deadmarshal_ has joined #commonlisp
gooba has quit [Remote host closed the connection]
gooba has joined #commonlisp
amb007 has quit [Ping timeout: 248 seconds]
rkazak has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
rainthree has joined #commonlisp
kevingal has joined #commonlisp
pranav has quit [Remote host closed the connection]
Thermoriax has quit [Ping timeout: 246 seconds]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<bike> jackdaniel: that's actually what i've been doing in clasp, though with a different function
amb007 has quit [Ping timeout: 244 seconds]
King_julian has joined #commonlisp
amb007 has joined #commonlisp
rkazak has joined #commonlisp
domovod has quit [Quit: WeeChat 4.5.1]
bpanthi977 has quit [Ping timeout: 276 seconds]
bpanthi977 has joined #commonlisp
rkazak has quit [Ping timeout: 246 seconds]
jonatack has joined #commonlisp
Guest96 has quit [Quit: Client closed]
alternateved has joined #commonlisp
Cymew has quit [Quit: Konversation terminated!]
rainthree has quit [Ping timeout: 244 seconds]
King_julian has quit [Ping timeout: 272 seconds]
Inline has quit [Quit: Leaving]
bpanthi977 has quit [Ping timeout: 264 seconds]
rkazak has joined #commonlisp
Inline has joined #commonlisp
pranav has joined #commonlisp
jonatack has quit [Ping timeout: 265 seconds]
kevingal has quit [Ping timeout: 265 seconds]
jonatack has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
cage has quit [Remote host closed the connection]
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
mishoo has quit [Ping timeout: 245 seconds]
drasken has joined #commonlisp
Thermoriax has joined #commonlisp
rkazak has joined #commonlisp
basicnpc has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.4]
<basicnpc> beach Thank you.
<basicnpc> What are some nontrivial usage of MOP? So far I've only seen some slight modification of MAKE-INSTANCE.. e.g. a database class would like to keep tract on how many instances are created so far.
<basicnpc> But that's a bit shallow. I wonder if there are some real-world usage that requires some deeper change of standard-class behavior.
<phoe> basicnpc: make a class whose instance storage is not backed by a vector, but by a hashtable, allowing memory-efficient storage of sparse slots; define your own modular funcallable instances; define slots with custom options of yours, e.g. allowing serializers to preserve some slot values and drop others
dtman34 has quit [Ping timeout: 265 seconds]
josrr has quit [Remote host closed the connection]
<jackdaniel> basicnpc: you may find some examples on my blog at turtleware.eu
<jackdaniel> proxy generic functions, some unusual method combinations etc
<jackdaniel> dynamically scoped slot values
varjag has joined #commonlisp
<basicnpc> phoe Wow! Any code for those?
bpanthi977 has joined #commonlisp
mgl has quit [Ping timeout: 248 seconds]
amb007 has quit [Ping timeout: 272 seconds]
<phoe> I don't have a list of examples anywhere
cmack` is now known as cmack
dtman34 has joined #commonlisp
<basicnpc> dyn scoped slot values sound cool too. thanks
<pranav> Sealable Metaobjects are cool too
<basicnpc> sealable?
<pranav> Marco Heisig presented them at ELS: https://www.youtube.com/watch?v=aS5HmEX5PKM
<ixelp> Sealable Metaobjects for Common Lisp - YouTube
<phoe> you can no longer dynamically extend them at runtime with new functionality, but you can make them go fast by statically optimizing generic dispatch
rkazak has quit [Ping timeout: 272 seconds]
mgl has joined #commonlisp
dtman34 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
pve has quit [Quit: leaving]
AmateurLisper has joined #commonlisp
notzmv has quit [Read error: Connection reset by peer]
dtman34 has joined #commonlisp
basicnpc has quit [Ping timeout: 252 seconds]
drasken has quit [Quit: Leaving.]
gusgr has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]