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/>
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life has joined #commonlisp
alendvai__ has quit [Read error: Connection reset by peer]
alendvai__ has joined #commonlisp
alendvai__ has quit [Remote host closed the connection]
alendvai__ has joined #commonlisp
avocadoist has quit [Quit: Konversation terminated!]
avocadoist has joined #commonlisp
alendvai__ has quit [Read error: Connection reset by peer]
alendvai__ has joined #commonlisp
<knusbaum> Wondering if there's a good doc-generator (or better, one that runs *in* the image to stay up to date with the development) that shows e.g. classes and the generic functions with specializations for them. I've looked a bit but not found a conclusive answer.
alendvai__ has quit [Remote host closed the connection]
alendvai__ has joined #commonlisp
alendvai__ has quit [Read error: Connection reset by peer]
alendvai__ has joined #commonlisp
random-nick has quit [Ping timeout: 260 seconds]
<edwlan[m]> I’ve wanted something like this
<edwlan[m]> I think this person has the closest to what I’d like to see: https://github.com/mmontone/slime-doc-contribs
<ixelp> GitHub - mmontone/slime-doc-contribs: Documentation contribs for SLIME (the Superior Lisp Interaction Mode for Emacs)
NicknameJohn has quit [Ping timeout: 256 seconds]
istewart has joined #commonlisp
bird_ has quit [Ping timeout: 248 seconds]
<knusbaum> mmmm. having some trouble getting that to work. :/
<knusbaum> It wants swank-info, but that doesn't seem to exist.
<knusbaum> Anyway...
<knusbaum> I'm getting sidetracked.
<edwlan[m]> Probably need to install other packages from their repositories
<edwlan[m]> They have a bunch of workflow improvement packages
<knusbaum> I see.
bird_ has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
alendvai__ has quit [Read error: Connection reset by peer]
alendvai__ has joined #commonlisp
defaultxr has quit [Remote host closed the connection]
<knusbaum> final (for now) https://github.com/knusbaum/cl-proto
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
bjorkintosh has quit [Changing host]
istewart has quit [Quit: Konversation terminated!]
istewart has joined #commonlisp
<Bike> char[m]: well a (cons whatever null) only has whatever in it. (or (cons integer null) (cons symbol null)) is (cons (or integer symbol) null) exactly. (it gets more complicated with cdr types though)
<char[m]> Bike: Thanks. That makes sense.
<Bike> list-of is more like having cdr types (in fact, list-of working like this is a conequence of how cdr types work). (or (cons a b) (cons c d)) is smaller than (cons (or a c) (or b d)), since the latter includes (cons a d)s and all
makomo has quit [Ping timeout: 260 seconds]
johnjaye has joined #commonlisp
alendvai__ has quit [Remote host closed the connection]
Catie has quit [Ping timeout: 246 seconds]
alendvai__ has joined #commonlisp
czy has joined #commonlisp
alendvai__ has quit [Remote host closed the connection]
alendvai__ has joined #commonlisp
dcb has quit [Quit: MSN Messenger v2.16.1]
dcb has joined #commonlisp
defaultxr has joined #commonlisp
attila_lendvai_ has joined #commonlisp
attila_lendvai_ has quit [Remote host closed the connection]
attila_lendvai_ has joined #commonlisp
alendvai__ has quit [Ping timeout: 256 seconds]
dcb has quit [Quit: MSN Messenger v2.16.1]
waleee has quit [Ping timeout: 240 seconds]
dcb has joined #commonlisp
flip214 has quit [Ping timeout: 260 seconds]
tyson2 has quit [Remote host closed the connection]
istewart has quit [Quit: Konversation terminated!]
flip214 has joined #commonlisp
<char[m]> Bike: What do you think of the extensions being called like clist-of carray-of as opposed to list-of array-of? I think it might open up the possibility of having parse-able and unparse-able forms of extensions. Or is that something you're not interested in having?
dcb has quit [Quit: MSN Messenger 3.8]
<cpli> are there any resources on the series library?
wilfred has joined #commonlisp
<cpli> motivation/implementation explanations?
<beach> If it is the library I think you mean, it is described in CLtL2.
<beach> cpli: Is that what you are asking for? It is not clear to me what you need to know.
<edgar-rft> cpli: this is probably what you're looking for -> https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node347.html
<ixelp> Appendix A. Series
czy has quit [Remote host closed the connection]
czy has joined #commonlisp
czy` has joined #commonlisp
czy has quit [Quit: ERC 5.6-git (IRC client for GNU Emacs 30.0.50)]
czy` has quit [Client Quit]
czy has joined #commonlisp
<beach> cpli: Are you still here?
dcb has joined #commonlisp
<czy> can i tell 'slime-describe-* to use 'completing-read as an interface?
chrcav has quit [Ping timeout: 240 seconds]
chrcav has joined #commonlisp
bilegeek has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
Brucio-61 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
Brucio-61 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
Brucio-61 has joined #commonlisp
_cymew_ has joined #commonlisp
NicknameJohn has joined #commonlisp
Algernon69 has joined #commonlisp
<beach> At which point should a form like (PUSHNEW ... :TEST ... :TEST-NOT) signal an error (because both TEST and TEST-NOT are given)? At macro-expansion time, at compile time or at run time?
<beach> And if it may signal a warning, when should that be? At macro-expansion time or at compile time?
<beach> I guess I am looking for hints that may be in the standard, as opposed to just opinions.
Algernon69 has quit [Ping timeout: 264 seconds]
<beach> I am a bit unsatisfied with what SBCL does:
<beach> (macroexpand-1 '(pushnew 234 (aref a 234) :test #'eq :test-not #'eq)) => no warning and no error.
<beach> (lambda (a) (pushnew 234 (aref a 234) :test #'eq :test-not #'eq)) => warning, but in terms of ADJOIN rather than PUSHNEW.
<mfiano> I would say that a warning should be issued at compile time, mostly because 1) I have been annoyed at macro-expansion warnings in the past that assumed only one expansion on a given implementation. This may not be so much of an issue for an implementor, and 2) because error messages often have more context available, and can be a bit noisy, at least on SBCL, when an error especially is signaled
<mfiano> at macro-expansion time. For the other case of when it should error, I want to say earlier, so macro-expansion time, but only if that gives me enough information and readably so, as to not make it too loud for nothing.
<mfiano> i meant that error messages could have more useful context after macro-expansion time. I am a bit tired and my thoughts are all over the place right now. I apologize, and can continue my thought with any questions in the morning :)
<beach> OK, thanks.
<mfiano> and I am also too tired to have read you "no opinions" line
<mfiano> your*
<mfiano> Good night
<beach> 'night mfiano.
Brucio-61 has quit [Read error: Connection reset by peer]
dcb has quit [Quit: MSN Messenger v2.16.1]
Cymew has joined #commonlisp
<beach> Personally, I would prefer not to have to know that PUSHNEW expands to ADJOIN, so I would have preferred a warning at macro-expansion time, and that the expansion then generates a call to error. But that's just me. Perhaps the standard says something different?
shka has joined #commonlisp
Brucio-61 has joined #commonlisp
<phoe> hmm
<phoe> where does the spec say the thing about specifying both :TEST and :TEST-NOT
<Alfr> clhs 17.2.1
<specbot> Satisfying a Two-Argument Test: http://www.lispworks.com/reference/HyperSpec/Body/17_ba.htm
<ixelp> CLHS: Section 17.2.1
<phoe> yes, this place, thanks
<beach> Yes, just found it.
<phoe> "The consequences are unspecified if both a :test and a :test-not argument are supplied in the same call to F."
<phoe> clhs 1.4.2
<ixelp> CLHS: Section 1.4.2
<phoe> "unpredictable but harmless"
<beach> But, as I recall, many operators have a more restrictive specification.
<phoe> would always signaling an error at macroexpansion time be "harmless", since the programmer has a way of noticing this and fixing this without the lisp image getting wrecked in some way?
<beach> Well, I wouldn't signal an error at macro-expansion time. Then the compilation would be interrupted.
<phoe> or does "harmless" mean that errors are out of scope?
<phoe> yes, that's the thing I'm thinking of
<phoe> but then, would an error at runtime also be "harmless"?
<beach> Well, here is what I think. The consequences are unspecified, but an implementation is allowed to specify the consequences. And I am in favor of giving the programmer as much help as I can provide.
<phoe> I assume that macroexpansion-time warnings would be okay since these are "harmless" as in they don't interrupt program operation
<beach> We may not have a definition of "harmless".
<beach> It could mean what you just said, or it could mean anything that does not corrupt the image.
<phoe> the glossary for H doesn't have "harmless" so we may need to invent it
<beach> And SBCL signals an error at run time for the form I mentioned: (lambda (a) ....)
<phoe> yes, understandable
<beach> Totally.
<beach> So I would think "harmless" means my last definition, "does not corrupt the image".
<phoe> sure, I agree with this
<beach> OK, so assuming we want an error to be signaled at run time for this form, it seems to me that the warning should be issued by PUSHNEW rather than by ADJOIN. And it seems to me that PUSHNEW should then never generate a call to ADJOIN, and instead a call to ERROR.
<beach> Thanks for the discussion. It seems pretty clear to me now.
Gnuxie has quit [Quit: Bridge terminating on SIGTERM]
usop[m] has quit [Quit: Bridge terminating on SIGTERM]
yitzi has quit [Quit: Bridge terminating on SIGTERM]
Mrtn[m] has quit [Quit: Bridge terminating on SIGTERM]
luffy[m] has quit [Quit: Bridge terminating on SIGTERM]
paulapatience has quit [Quit: Bridge terminating on SIGTERM]
kakuhen has quit [Quit: Bridge terminating on SIGTERM]
BrownJenkin has quit [Quit: Bridge terminating on SIGTERM]
Duuqnd has quit [Quit: Bridge terminating on SIGTERM]
edgarvincent[m] has quit [Quit: Bridge terminating on SIGTERM]
JonBoone[m] has quit [Quit: Bridge terminating on SIGTERM]
edwlan[m] has quit [Quit: Bridge terminating on SIGTERM]
char[m] has quit [Quit: Bridge terminating on SIGTERM]
jryans has quit [Quit: Bridge terminating on SIGTERM]
dieggsy has quit [Quit: Bridge terminating on SIGTERM]
nicm[m] has quit [Quit: Bridge terminating on SIGTERM]
hayley has quit [Quit: Bridge terminating on SIGTERM]
bitblit1 has quit [Quit: Bridge terminating on SIGTERM]
roygbyte[m] has quit [Quit: Bridge terminating on SIGTERM]
loke[m] has quit [Quit: Bridge terminating on SIGTERM]
emacsomancer[m] has quit [Quit: Bridge terminating on SIGTERM]
infra_red[m] has quit [Quit: Bridge terminating on SIGTERM]
Enapiuz[m] has quit [Quit: Bridge terminating on SIGTERM]
DouglasRMiles[m] has quit [Quit: Bridge terminating on SIGTERM]
g-tenko-r[m] has quit [Quit: Bridge terminating on SIGTERM]
alanz has quit [Quit: Bridge terminating on SIGTERM]
bilegeek has quit [Quit: Leaving]
bilegeek has joined #commonlisp
NicknameJohn has quit [Remote host closed the connection]
igemnace has joined #commonlisp
<beach> Implementing a macro that has keyword parameters can be interesting, because this is legal: (pushnew 234 *a* :allow-other-keys t :hello (print "hello") :test #'= :hi (print "hi"))
<beach> And the forms must be evaluated in the right order in the expansion.
<beach> Oh, wait, so this is in fact mission impossible.
<beach> Hmm, let me think...
wilfred has quit [Quit: Connection closed for inactivity]
<phoe> welp, right, (let ((x :test) (y :test-not)) (pushnew 234 *a* x #'eq y #'eq))
<phoe> is this legal CL?
<beach> yes, I was thinking of something like that.
<phoe> in case you have some non-CONSTANTP keys, you could expand into a form that evaluates these and checks if :TEST and :TEST-NOT are both present, at which point a runtime IF signals an error
<phoe> welp, wait, not that evaluates these - that binds them to variables of some sort
<beach> Yes, indeed.
<beach> But for SICL I have a better plan actually. The plan is to avoid reporting warnings and errors in terms of forms seen by the compiler, and instead in terms of the source code actually written by the programmer. But now, I am working on Constrictor, and external library that implements the operators in the Conses dictionary.
<beach> The SICL plan makes everything simple. But should I give more help for other users of Constrictor? That's the question.
<beach> With the SICL plan, it doesn't matter what the expansion looks like, because what ever the ultimate expansion looks like, the condition will be reported for the source code.
<beach> *whatever
<beach> So anyway, the conclusion is that in general there can be no warnings (aside perhaps for reporting an odd number of keyword arguments) at macro-expansion time, because the macro function receives unevaluated forms.
lucas_ta has joined #commonlisp
lucasta has quit [Read error: Connection reset by peer]
<beach> Perhaps I shouldn't work too hard with Constrictor to give more information, when the library is used with Common Lisp implementations that don't report the original source code. I should perhaps instead encourage maintainers of Common Lisp implementations to improve condition reporting.
bilegeek has quit [Quit: Leaving]
LW has joined #commonlisp
Brucio-61 has quit [Read error: Connection reset by peer]
Brucio-61 has joined #commonlisp
<beach> So what is supposed to happen in the macro function of a macro defined to have &KEY parameters?
<beach> The macro function can't very well check for keyword arguments, since it receives unevaluated forms.
pve has joined #commonlisp
<Krystof> I should go to work, but: I think there's a case that keyword arguments should be tested for in the expanded code, not in the macro function
<Krystof> so for pushnew, that's fairly easy because there's a natural expansion for pushnew in terms of adjoin
<beach> Yeah, so that puts constraints on what parse-macro can do.
<beach> Right.
<Krystof> for things like (with-open-stream (s ...) ...) you have to imagine a notional "(defun call-with-open-stream (s &key ...) ...)" even if that's not how you're actually implementing it
<beach> I'll check your example later. I must run now. Thanks!
<beach> Ah, yes, I see. That's in fact a good way to implement it. Then the code for checking the keyword arguments would be in one place, in the compiler for functions.
<beach> And then, there would be very few macros with &KEY parameters, if any.
<beach> Oh, parse-macro could generate an FLET with &KEY parameters I guess.
notzmv has joined #commonlisp
* beach must really go now.
Brucio-61 has quit [Ping timeout: 260 seconds]
makomo has joined #commonlisp
Brucio-61 has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
edgarvincent[m] has joined #commonlisp
Lord_of_Life has joined #commonlisp
Algernon69 has joined #commonlisp
Algernon69 has quit [Ping timeout: 260 seconds]
glaucon has joined #commonlisp
Josh_2 has joined #commonlisp
notzmv has quit [Ping timeout: 265 seconds]
Brucio-61 has quit [Ping timeout: 260 seconds]
Brucio-61 has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
Brucio-61 has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
Brucio-61 has joined #commonlisp
attila_lendvai_ has quit [Read error: Connection reset by peer]
attila_lendvai_ has joined #commonlisp
varjag has joined #commonlisp
LW has quit [Quit: WeeChat 3.8]
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
attila_lendvai_ has quit [Read error: Connection reset by peer]
attila_lendvai_ has joined #commonlisp
vinnland has joined #commonlisp
attila_lendvai_ is now known as attila_lendvai
Algernon91 has joined #commonlisp
glaucon has quit [Read error: Connection reset by peer]
lucas__ta has joined #commonlisp
lucas_ta has quit [Ping timeout: 264 seconds]
Brucio-61 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
kevingal has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
Brucio-61 has joined #commonlisp
kevingal has quit [Ping timeout: 265 seconds]
Josh_2 has quit [Ping timeout: 265 seconds]
Algernon91 has quit [Ping timeout: 264 seconds]
notzmv has joined #commonlisp
lucas__ta has quit [Read error: Connection reset by peer]
_cymew_ has quit [Ping timeout: 264 seconds]
jonatack has quit [Ping timeout: 268 seconds]
scymtym has joined #commonlisp
random-nick has joined #commonlisp
rgherdt has joined #commonlisp
rgherdt_ has joined #commonlisp
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
rgherdt has quit [Ping timeout: 240 seconds]
attila_lendvai_ has quit [Read error: Connection reset by peer]
Algernon91 has joined #commonlisp
attila_lendvai_ has joined #commonlisp
Algernon91 has quit [Ping timeout: 264 seconds]
kevingal has joined #commonlisp
rgherdt_ has quit [Ping timeout: 264 seconds]
tyson2 has joined #commonlisp
<beach> So (defmacro foo (bar &key baz) `(list ,bar ,baz)) and then (let ((x :baz)) (foo 22 x 33)) signals an error in SBCL.
Mrtn[m] has joined #commonlisp
dieggsy has joined #commonlisp
Gnuxie has joined #commonlisp
yitzi has joined #commonlisp
kakuhen has joined #commonlisp
char[m] has joined #commonlisp
Duuqnd has joined #commonlisp
BrownJenkin has joined #commonlisp
paulapatience has joined #commonlisp
loke[m] has joined #commonlisp
roygbyte[m] has joined #commonlisp
edwlan[m] has joined #commonlisp
alanz has joined #commonlisp
bitblit1 has joined #commonlisp
JonBoone[m] has joined #commonlisp
jryans has joined #commonlisp
hayley has joined #commonlisp
emacsomancer[m] has joined #commonlisp
usop[m] has joined #commonlisp
luffy[m] has joined #commonlisp
DouglasRMiles[m] has joined #commonlisp
infra_red[m] has joined #commonlisp
nicm[m] has joined #commonlisp
Enapiuz[m] has joined #commonlisp
<beach> But (let ((x :test) (y '())) (pushnew 234 y x #'=)) does not.
<beach> If I understand what Krystof meant, then the first one should work as well.
tibfulv has quit [Read error: Connection reset by peer]
tibfulv has joined #commonlisp
<jackdaniel> spec defmacro
* jackdaniel never remembers the bot command thing :(
<beach> clhs defmacro
<ixelp> CLHS: Macro DEFMACRO
<jackdaniel> thanks
jmdaemon has quit [Ping timeout: 260 seconds]
<jackdaniel> how can you parametrize a macro with keyword arguments if they are allowed to be available only at the runtime (i.e they are not constantp at compile time)?
<beach> You do what Krystof suggested and what PUSHNEW does.
<beach> I just can't see how both those examples could be correct. And I don't recall reading anything in the standard that suggests that one or the other is incorrect.
attila_lendvai_ has quit [Read error: Connection reset by peer]
attila_lendvai_ has joined #commonlisp
defaultxr has quit [Ping timeout: 268 seconds]
<jackdaniel> defmacro specification says: "The parameter variables in lambda-list are bound to destructured portions of the macro call.", how can they be bound if we accept that they are not constant so they are available only at runtime?
<phoe> clhs 3.1.2.1.2.2
<ixelp> CLHS: Section 3.1.2.1.2.2
<phoe> "If the operator names a macro, its associated macro function is applied to the entire form and the result of that application is used in place of the original form."
<jackdaniel> I can see that some macros could do something like (defmacro foo ((&rest args) &body body) `(call-with-foo (lambda () ,@body) ,@args))), but in this case the parameter args is not further destructured, so it may have arbitrary (runtime-available) keys
<jackdaniel> phoe: I don't see the contradiction - it does not say that you apply an evaluated form (and that would be in fact rather impossible at compile time)
<beach> I can't see how some macros can do one thing and some others the other thing.
<jackdaniel> phoe: (and that /unevaluated/ form is destructured against the lambda list)
<phoe> jackdaniel: yes, I'm just digesting the implication of this wrt &key
<jackdaniel> I see, I've misunderstood then, thanks
<jackdaniel> if a macro /implementation/ accepts some wildcard "args", then it may pass it forward without destructuring. if the macro lists keys then they must be destructured at compile time
<jackdaniel> as of why sbcl's pushnew accepts runtime arguments it is implicit from the definition here https://github.com/search?q=repo%3Asbcl%2Fsbcl%20defmacro%20pushnew&type=code
<ixelp> Sign in to GitHub · GitHub
<jackdaniel> (sb-xc:defmacro pushnew (obj place &rest keys &environment env) ...)
<jackdaniel> note that keys are a single parameter
<beach> But that's not what the standard says about the lambda list of PUSHNEW.
<jackdaniel> that's why I've said /implementation/ - you could argue that what sbcl does is a bug
<jackdaniel> but on the defmacro level these things seem clear - form is expected to be destructured at compile time against the /actual/ macro lambda list
<beach> Oh, I know what SBCL does. But that's not what I am interested in. I am interested in what is conforming behavior.
<beach> Can you give me the page of that phrase, please?
<jackdaniel> clhs defmacro
<ixelp> CLHS: Macro DEFMACRO
<jackdaniel> second paragraph of the description
<beach> That's not the phrase I was looking for.
<beach> I was looking for: "if a macro /implementation/ accepts some wildcard "args", then it may pass it forward without destructuring. if the macro lists keys then they must be destructured at compile time"
<beach> and "form is expected to be destructured at compile time against the /actual/ macro lambda list"
attila_lendvai_ is now known as attila_lendvai
defaultxr has joined #commonlisp
<jackdaniel> I think that with such attitude this is going nowhere, so I'll just get back to whatever I was doing until now.
<beach> Oh? Did I say something wrong?
<beach> Oh, well.
<jackdaniel> I wouldn't say that sarcasm is wrong, but it is not the most productive approach
<phoe> I think that jackdaniel paraphrased the spec, and beach was looking for the parts of the standard that are the sources of this paraphrase
<beach> I am not being sarcastic at all.
<scymtym> this is pretty weak evidence but the definition of WITH-OPEN-FILE avoids keyword parameters in the macro lambda list and explicitly delegates the keyword processing to OPEN: https://novaspec.org/cl/f_with-open-file
<ixelp> with-open-file | Common Lisp Nova Spec
<beach> scymtym: Yes, Krystof gave that as an example.
<phoe> (and, from what I know beach, he's not sarcastic, he's just getting more and more focused on the task at hand with each passing year)
<jackdaniel> perhaps you are not, but that's how I read it
<beach> I am sorry to hear that.
euandreh has joined #commonlisp
<beach> scymtym: And that's also what SBCL PUSHNEW does. But if the lambda list has to be destructured at compile time, and the keywords must be present in the macro call form as such, then that approach is wrong.
<scymtym> beach: i think he mentioned WITH-OPEN-STREAM which does not involve keyword parameters. WITH-OPEN-FILE may be interesting because it does involve keyword parameter and also explicitly discusses the delegation to OPEN
<beach> Oh, I see. Thanks.
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
<beach> scymtym: Is that discussion in the standard or in the SBCL implementation of WITH-OPEN-FILE?
<scymtym> beach: right, i got that. i meant that the way WITH-OPEN-STREAM is defined is weak evidence that delegating to ADJOIN is indeed incorrect for PUSHNEW
<contrapunctus> Is there a library like this for Common Lisp? I looked through awesome-cl and Cliki, but didn't find anything. https://wiki.call-cc.org/eggref/5/fmt
<ixelp> fmt - The CHICKEN Scheme wiki
<beach> scymtym: Got it! Thanks!
<phoe> beach: it's in the standard page for WITH-OPEN-FILE: "OPTIONS are used as keyword arguments to OPEN"
<beach> phoe: Oh, OK. :(
<scymtym> what phoe said
<phoe> contrapunctus: this looks like cl:format except on steroids, with the format control being a s-expression-esque DSL rather than a string
<beach> Oh, right, WITH-OPEN-FILE does not have &KEY in the lambda list.
<contrapunctus> phoe: indeed
<scymtym> beach: exactly
<beach> OK, so back to square one. The good news is that my implementation of PARSE-MACRO does the right thing and destructures at macro-expansion time.
<ixelp> GitHub - mmontone/fmt: Extensible text formatting facility for Common Lisp
<beach> The bad news is that my implementation of PUSHNEW is Constrictor is now wrong.
<scymtym> beach: it would be better to derive a conclusion from the specified evaluation semantics for macro lambda lists, of course. that's why i called the above weak evidence
<contrapunctus> phoe: oh excellent, thanks!
<beach> scymtym: Absolutely. But I can't find such a specification.
<jackdaniel> contrapunctus: check out also a pretty printer in common lisp
<jackdaniel> and the macro OUT in ytools
attila_lendvai has quit [Read error: Connection reset by peer]
<hayley> The Common Lisp pretty printer or Wadler's "prettier printer"?
<beach> Thanks again for this discussion. This is more evidence that we need this website that I have been referring to as "Common Lisp for language implementers".
attila_lendvai has joined #commonlisp
<phoe> the invention of printing has put many scribes out of their jobs, this is why almost nobody uses CL:WRITE anymore
<knusbaum> Working on SICL?
grawlinson has quit [Ping timeout: 268 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
waleee has joined #commonlisp
grawlinson has joined #commonlisp
<beach> knusbaum: Me? Yes, indirectly. I am extracting (and often rewriting) SICL modules to separate libraries.
<beach> Constrictor is the extraction (and almost complete rewrite) of the SICL Conses module.
ec_ has joined #commonlisp
ec has quit [Ping timeout: 240 seconds]
azimut has joined #commonlisp
euandreh has quit [Ping timeout: 240 seconds]
euandreh has joined #commonlisp
NotThatRPG has joined #commonlisp
<knusbaum> Neat!
<knusbaum> Haven't checked out SICL in a long time.
<beach> Thanks!
<beach> It is moving very slowly, unfortunately.
<knusbaum> That's too bad. It's been on my radar for a very long time. How much of the standard is implemented now?
<beach> Oh, that's not the problem.
<knusbaum> Just the refactoring?
<beach> I think most of the standard is implemented.
tyson2 has quit [Remote host closed the connection]
<beach> Yes, so there is a lot of code now that could (and should) be delegated to external libraries, so that's what I am working on.
<beach> Plus, scymtym is working on the s-expression-syntax library, which will make it possible to delete lots of SICL code.
<knusbaum> I see.
ym has joined #commonlisp
<beach> So, for instance, for SICL, I took the portable conditions system that phoe wrote, and modified it to be an "intrinsic" system, but what I now want to do is to create a separate library with phoe's code, so that it can be configured to be either "extrinsic" (pretty much phoe's code) or "intrinsic" (so that it can be use in a new implementation). Right now, it is just my version of some of phoe's stuff, and it is not pretty.
tyson2 has joined #commonlisp
Algernon91 has joined #commonlisp
msavoritias has joined #commonlisp
waleee has quit [Ping timeout: 265 seconds]
_cymew_ has joined #commonlisp
notzmv has quit [Ping timeout: 240 seconds]
<phoe> ;; note: I didn't fully write it myself, I merely adapted and modernized the original sources that Kent Pitman wrote
glaucon has joined #commonlisp
<beach> I see. I guess I need to check the license of the original then.
<phoe> public domain
<phoe> same as PCS
Algernon91 has quit [Ping timeout: 264 seconds]
<beach> OK.
<phoe> just the tests are licensed under MIT since they were pulled from ANSI-TEST
<beach> I see.
<knusbaum> What do intrinsic and extrinsic mean in this context?
<beach> Basically "extrinsic" = "cross", i.e., something that can be loaded into an implementation that already has its own implementation of the same thing. And "intrinsic" means native to an implementation, presumably one that is being created.
<beach> I came up with those terms. They are not ideal, but I couldn't think of anything better. I mean "cross" is not an adjective, at least not with the right meaning.
<knusbaum> I see. Would the extrinsic version replace the existing implementation, or would you have to reference it explicitly with, like, (myconditions:define-condition ...)
<beach> The latter.
<beach> Intrinsic versions are currently only interesting for SICL and perhaps Clasp.
<beach> Other Common Lisp implementations already have their own versions and don't particularly want to change. Plus, their bootstrapping techniques probably won't allow the use of the intrinsic versions we write now.
<beach> I mentioned Clasp, because Bike seems to be moving in the direction of the SICL bootstrapping technique.
Cymew has quit [Quit: Konversation terminated!]
<knusbaum> Does SICL use LLVM underneath?
<beach> No.
<knusbaum> Cool. Just curious.
<beach> That would be very complicated I think.
<beach> Clasp can do it because the entire idea with Clasp is interoperability with C++, and the official LLVM API is in C++.
<beach> (correct me if I am wrong)
<knusbaum> Yes, I believe that's correct.
<knusbaum> Does SICL implement a VM or does it compile to machine code?
<beach> Plus, apparently LLVM is very slow. Not the code it generates, but the code that does the generation.
<knusbaum> Yes, LLVM is notoriously slow to compile.
<knusbaum> slow *at* compiling, that is.
<beach> Both kind of. The VM is defined in terms of intermediate code, but we then generate machine code.
<knusbaum> Is it a JIT kind of thing?
<beach> It shouldn't be surprising that LLVM is slow really. As I have often pointed out, it is impossible to write a C++ program that is both modular and fast. They must have chosen modular.
waleee has joined #commonlisp
<knusbaum> From what I understand, yes.
vinnland has quit [Read error: Connection reset by peer]
waleee has quit [Ping timeout: 246 seconds]
Gleefre has quit [Ping timeout: 245 seconds]
wilfred has joined #commonlisp
<knusbaum> anyone used cl-sqlite?
<knusbaum> I'm finding it very weird that prepare-statement will return cached instances, since they are stateful and if two things use the same statement at once it ruins the results for both.
<knusbaum> hmm, actually it looks like they don't go in the cash until they're "finalized". I must have done something dumb, it's working as expected now.
attila_lendvai has quit [Read error: Connection reset by peer]
<knusbaum> *cache
Gleefre has joined #commonlisp
attila_lendvai has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
piethesailor has joined #commonlisp
jmdaemon has joined #commonlisp
NotThatRPG has quit [Ping timeout: 240 seconds]
NotThatRPG has joined #commonlisp
surabax has joined #commonlisp
NotThatRPG has quit [Ping timeout: 264 seconds]
nij- has joined #commonlisp
<semz> Does a form have to be a tree or does a DAG suffice? I know cyclic forms are an express ticket to hell, but is something like e.g. (let ((foo #1=(make-foo #| lots of options here |#))) (lambda () (when (bar) (setf foo #1#)) (baz foo))) legal?
<beach> We had that discussion the other day with pjb and didn't come to any conclusion, other than that it is unlikely that the compiler will check for sharing, so it will probably work.
<phoe> semz: (let ((list '#1=(1 2 3 . #1#))) (nth 200 list))
<phoe> look ma, it's a cycle in a Lisp form
<semz> alright, cycles outside of quote :-)
<beach> We concluded that cycles are allowed in literals.
<phoe> semz: oh you mean like (let ((vector #1=#(1 2 3 #1#))) (aref vector 1))
<semz> help
<phoe> semz: the above thing that you posted should be permitted though
<phoe> like, (list #1='(1 2 3 4 5 6 7 8 9) #1# #1# #1#) should be valid for the same reason
<phoe> I can't see any reason why the compiler would break upon encountering such a form
<phoe> or any form with cons subforms that are EQ to one another
<phoe> ...or cons syntax that isn't Lisp forms that is EQ to something else
nij- has quit [Ping timeout: 240 seconds]
<phoe> like, I don't think the specification says anything about the compiler or evaluator being allowed to behave in non-obvious manners upon encountering forms that are EQ to one another
jonatack has joined #commonlisp
jonatack has quit [Client Quit]
kevingal has quit [Ping timeout: 265 seconds]
morganw has joined #commonlisp
jonatack has joined #commonlisp
NotThatRPG has joined #commonlisp
jonatack has quit [Ping timeout: 265 seconds]
jonatack has joined #commonlisp
igemnace has quit [Remote host closed the connection]
dcb has joined #commonlisp
waleee has joined #commonlisp
lucasta has joined #commonlisp
dcb has quit [Quit: MSN Messenger v2.16.1]
semz has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
semz has joined #commonlisp
wilfred has quit [Quit: Connection closed for inactivity]
cage has joined #commonlisp
tyson2 has joined #commonlisp
rgherdt has joined #commonlisp
waleee has quit [Ping timeout: 256 seconds]
waleee has joined #commonlisp
dcb has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
msavoritias has quit [Ping timeout: 256 seconds]
rogersm has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 240 seconds]
attila_lendvai has quit [Remote host closed the connection]
surabax has quit [Quit: Leaving]
attila_lendvai has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
dcb has quit [Remote host closed the connection]
dcb has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 28.2]
glaucon has quit [Read error: Connection reset by peer]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
piethesailor has quit [Remote host closed the connection]
_cymew_ has quit [Ping timeout: 264 seconds]
surabax[m] has joined #commonlisp
pve has quit [Quit: leaving]
shka has quit [Ping timeout: 265 seconds]
karlosz has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
alanz has quit [Remote host closed the connection]
<edwlan[m]> Yeah, I think lisp syntax is essentially an arbitrary data structure
<edwlan[m]> clhs eval
<ixelp> CLHS: Function EVAL
<edwlan[m]> Most objects are just self-evaluating
<edwlan[m]> Of note is that eval takes a form, a form is either a symbol, a compound form or a self-evaluating object (per the glossary)
<edwlan[m]> And a self evaluating object is any object other than a symbol or a cons
NotThatRPG has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
<tevo> The talk on cyclic forms reminded me of https://www.ccs.neu.edu/home/shivers/newstyle.html
<ixelp> Stylish Lisp programming techniques
NotThatRPG has quit [Ping timeout: 240 seconds]
yakubin has joined #commonlisp
dcb has quit [Remote host closed the connection]
dcb has joined #commonlisp
notzmv has joined #commonlisp
_dcb_ has joined #commonlisp
_dcb_ has quit [Client Quit]
_dcb has joined #commonlisp
dcb has quit [Remote host closed the connection]
yakubin has left #commonlisp [Bye]
NotThatRPG has joined #commonlisp
tyson2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
anticomputer has quit [Ping timeout: 240 seconds]
anticomputer has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
alanz has joined #commonlisp
makomo has quit [Ping timeout: 240 seconds]
euandreh has quit [Remote host closed the connection]
piethesailor has joined #commonlisp
<piethesailor> Anyone have a reccomendation for which LLM is best for CL development? Open AI is nice, but gets code really wrong sometimes. Anyone use Co-pilot? is it good despite the cost?
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
<piethesailor> Course now that I look into it, co-pilot isnt a LLM?
<edwlan[m]> I’ve been using copilot a bit and don’t find it very useful
<edwlan[m]> It uses one
chrcav has quit [Ping timeout: 260 seconds]
Lycurgus has joined #commonlisp
<piethesailor> edwlan[m]: thats too bad. Thanks for the input. I find brainstorming what I want to do with Open AI LLM is fantastic, but yeah code is not up to par
chrcav has joined #commonlisp
Oladon has joined #commonlisp
<bjorkintosh> it's early days yet.
<bjorkintosh> give it a decade or so.
bjorkintosh has quit [Quit: Leaving]
<Lycurgus> i also found copilot disappointing after being in queue for a trial before it went GA
_dcb is now known as dcb
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
<piethesailor> Another question.. Anyone use cl-selenium?
bjorkintosh has joined #commonlisp