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/>
bilegeek has joined #commonlisp
vjalmr has quit [Ping timeout: 255 seconds]
Jach has quit [Quit: Leaving.]
Pirx has quit [Ping timeout: 240 seconds]
Jach has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life has joined #commonlisp
waleee has quit [Ping timeout: 245 seconds]
yitzi has quit [Remote host closed the connection]
edgar-rft has quit [Ping timeout: 255 seconds]
jon_atack has quit [Ping timeout: 255 seconds]
jonatack has joined #commonlisp
<ldb> how do I instruct SBCL to perform least optimization possible?
<hayley> (declaim (optimize (speed 0) (debug 3) (safety 3)))
<ldb> lol I think even with this lowest setting SBCL would still constant fold floating point arith expression
<ldb> I think this is not a good thing
<moon-child> yes that's bad
<moon-child> there is sb-c::float-accuracy but it's not very useful
zaymington has joined #commonlisp
<moon-child> related: (+ a 1 b 2) is 'optimised' to (+ 3 a b). Allowed by spec but also bad. (It's fine if a and b are known to not be floats, and if they have unknown type, the dispatch cost dominates, so it doesn't seem particularly problematic)
Oladon has joined #commonlisp
Inline has quit [Ping timeout: 264 seconds]
tyson2 has quit [Remote host closed the connection]
<ldb> Shinmera: pushed PR
Lestat9 has joined #commonlisp
jonatack has quit [K-Lined]
mzan has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
mzan has joined #commonlisp
Lestat9 has quit [Quit: Leaving]
habamax has quit [Ping timeout: 255 seconds]
bilegeek has quit [Quit: Leaving]
jonatack has joined #commonlisp
Allak has joined #commonlisp
Oladon has quit [Quit: Leaving.]
masinter has joined #commonlisp
masinter has quit [Remote host closed the connection]
habamax has joined #commonlisp
Allak has quit [Remote host closed the connection]
edgar-rft has joined #commonlisp
alphacentauri has quit [Quit: WeeChat 4.0.5]
zaymington has quit [Remote host closed the connection]
zaymington has joined #commonlisp
dcb has quit [Quit: MSN Messenger 4.0.5]
ldb has left #commonlisp [ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
dcb has joined #commonlisp
alphacentauri has joined #commonlisp
molson__ has joined #commonlisp
dcb has quit [Quit: MSN Messenger 4.0.5]
molson_ has quit [Ping timeout: 240 seconds]
habamax has quit [Ping timeout: 258 seconds]
qhong_ has joined #commonlisp
moon-child has quit [Ping timeout: 240 seconds]
childlikempress has joined #commonlisp
qhong has quit [Ping timeout: 240 seconds]
mzan has quit [Ping timeout: 272 seconds]
mzan has joined #commonlisp
ronald has quit [Ping timeout: 255 seconds]
ronald_ has quit [Ping timeout: 255 seconds]
ronald has joined #commonlisp
habamax has joined #commonlisp
ronald_ has joined #commonlisp
Oladon has joined #commonlisp
random-jellyfish has joined #commonlisp
<random-jellyfish> should I trust ql packages that don't have any tests in their source code?
<hayley> In what sense of "trust"?
<random-jellyfish> as in trust that they are bug free
<random-jellyfish> that I won't have to debug them if I use them
<random-jellyfish> and add fixes to them
<gilberth> How would tests change that?
<random-jellyfish> well the more tests the better, that would show that they have been exercised and can be easily maintained if changes are made to them
<random-jellyfish> it's usually a good sign that they are not just abandoned pet projects
<mfiano> You cannot trust that any software is bug free, because it is not.
<gilberth> Thing is: As long as tests are written by the same that wrote the code, those tests are overrated. Because when I mess thinking of some corner case while programming I won't come up with corner case when I write tests.
<gilberth> Furthemore I have the hunch that this focus on tests stems from languages that don't have a REPL.
<mfiano> Nor interactive conditions
<random-jellyfish> a few tests are better than none
<mfiano> Then you answered your own question. Go look for a library with a few so you can trust it.
<random-jellyfish> I was wondering if there are other ways to assess the quality of a package
<random-jellyfish> for example there is this package sandalphon.lambda-list for parsing lambda list
<random-jellyfish> it looks very promising
<random-jellyfish> it's exactly what I'm looking for
<random-jellyfish> but it has no tests
<random-jellyfish> should I use it?
<mfiano> I would assess it on functionality, not on its looks.
<mfiano> Does it solve a problem? Are you able to hack on it?
<mfiano> If the answer is no to either, probably not.
<random-jellyfish> what do you mean by "hack on it"?
Inline has joined #commonlisp
<mfiano> If you have to ask someone else to fix something for you because you are unable to, then it is a bigger risk assessment.
<mfiano> Or add a new feature for your new problem domain.
<random-jellyfish> good points, thanks
<random-jellyfish> do packages have to meet certain conditions to be in included in the quicklisp list of installable packages?
<mfiano> projects and systems you mean? Yes. But it is not much.
<mfiano> They merely have to have a maintainer and license specified in the system definitions, and be compilable on some recent-ish version of SBCL in the Quicklisp maintainer's deployment environment.
zaymington has quit [Remote host closed the connection]
zaymington has joined #commonlisp
<mfiano> Compilable meaning, they load successfully without any warnings that are not simply STYLE-WARNING
<random-jellyfish> I see...probably the shortage of lisp developers willing to share their work forced them to lower the bar lol
<beach> random-jellyfish: You could contribute by adding tests to existing projects.
<random-jellyfish> it's good either way, even broken projects are okay if they at least put some good ideas on the table
<random-jellyfish> beach good idea, I'll think about that
contrapunctus has joined #commonlisp
Oladon has quit [Quit: Leaving.]
Cymew has joined #commonlisp
shka has joined #commonlisp
_cymew_ has joined #commonlisp
kopiyka has quit [Remote host closed the connection]
kopiyka has joined #commonlisp
igemnace has joined #commonlisp
rgherdt has joined #commonlisp
varjag has joined #commonlisp
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
pve has joined #commonlisp
danza has joined #commonlisp
dino_tutter has joined #commonlisp
pve has quit [Ping timeout: 258 seconds]
pve has joined #commonlisp
danza has quit [Ping timeout: 255 seconds]
mgl has joined #commonlisp
azimut has quit [Ping timeout: 252 seconds]
ec has quit [Ping timeout: 252 seconds]
anticomputer has quit [Ping timeout: 252 seconds]
anticomputer has joined #commonlisp
ec has joined #commonlisp
pve has quit [Read error: Connection reset by peer]
azimut has joined #commonlisp
pve has joined #commonlisp
mht-wtf has quit [Ping timeout: 255 seconds]
mht-wtf has joined #commonlisp
danse-nr3 has joined #commonlisp
msavoritias has joined #commonlisp
OlCe has joined #commonlisp
bendersteed has joined #commonlisp
Pirx has joined #commonlisp
liminality has joined #commonlisp
Gleefre has quit [Ping timeout: 245 seconds]
zaymington has quit [Ping timeout: 260 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
liminality has quit [Ping timeout: 255 seconds]
liminality has joined #commonlisp
azimut has quit [Ping timeout: 252 seconds]
donleo has joined #commonlisp
pve has quit [Quit: leaving]
habamax has joined #commonlisp
anticrisis has quit [Read error: Connection reset by peer]
pve has joined #commonlisp
rogersm has quit [Read error: Connection reset by peer]
rogersm_ has joined #commonlisp
flip214_ has quit [Ping timeout: 260 seconds]
flip214 has joined #commonlisp
attila_lendvai has joined #commonlisp
kurfen has quit [Read error: Connection reset by peer]
kurfen has joined #commonlisp
alphacentauri has quit [Quit: WeeChat 4.0.5]
herjazz has joined #commonlisp
yitzi has joined #commonlisp
bendersteed has quit [Remote host closed the connection]
bendersteed has joined #commonlisp
bendersteed has quit [Remote host closed the connection]
bendersteed has joined #commonlisp
<Shinmera> Ime the more tests my library has the less likely it is to be bug free
<Shinmera> because I only write tests in correlation to how much I think they are necessary
danse-nr3 has quit [Ping timeout: 255 seconds]
random-nick has joined #commonlisp
ec has quit [Read error: Connection reset by peer]
ec has joined #commonlisp
tibfulv has quit [Ping timeout: 240 seconds]
tibfulv has joined #commonlisp
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Ping timeout: 248 seconds]
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1.50)]
molson__ has quit [Remote host closed the connection]
danse-nr3 has joined #commonlisp
<phoe> is there a s-expression diff library available somewhere on Quicklisp?
<phoe> I can see https://github.com/michaelw/mw-diff-sexp/blob/master/diff-sexp.lisp but it's not on QL from what I see
tyson2 has joined #commonlisp
alphacentauri has joined #commonlisp
<beach> When I profile some code using sb-sprof, I get that 99.9% of the time is spent in "foreign function __poll". Can someone enlighten me as to what this result means?
<beach> ... called from SB-SYS:WAIT-UNTIL-FD-USABLE.
<beach> Maybe I should restart my image to see whether the problem persists.
igemnace has quit [Read error: Connection reset by peer]
<phoe> beach: looks like it's waiting on input from file or network
<phoe> __poll would be a Unix syscall that waits for input
<phoe> what code is that?
<beach> Yes, I got that much, but it is just code manipulating S-expressions. Nothing out of the ordinary.
<beach> Same result after restarting the image.
<phoe> huh, weird
<phoe> how is WAIT-UNTIL-FD-USABLE even making its way on the call stack if you're just manipulating sexprs?
<phoe> I'd need to see the flame graph to figure out what calls it
<beach> Hmm, READ is involved.
<Brucio-61> i haven't tracked sb-prof changes too closely but in the past, the collected samples covered all threads, depending on the configuration. maybe the waiting happens in a thread related to SLIME
<Brucio-61> *sb-sprof
<beach> Let me check a bit deeper.
<beach> Brucio-61: Yeah, that could be. The thing is, one part of my code is very slow in that it hangs for quite some time, so I was expecting some of my code to show up, but it doesn't in any significant way.
herjazz has quit [Quit: leaving]
rogersm_ has quit [Read error: Connection reset by peer]
rogersm has joined #commonlisp
<beach> I did a few C-c C-c while the code is taking time, and now I think the code I am interested in does now show up in the profile report.
rogersm has quit [Client Quit]
igemnace has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
chrcav has quit [Quit: leaving]
notzmv has joined #commonlisp
attila_lendvai_ has quit [Quit: Leaving]
<Shinmera> beach: are you using slime-sprof-report?
waleee has joined #commonlisp
<beach> No, I was just using (SB-SPROF:REPORT)
<Shinmera> I highly recommend it instead
<Shinmera> it lets you expand each line and see what callers and callees there are and their respective times
<Shinmera> makes it much easier to read
<Shinmera> you can also use v to jump to the source like usual
<beach> Thanks. But in this case, the code I am interested in does not even show up in the report.
<beach> It turns out, the code is the SBCL compiler.
bendersteed has quit [Quit: bendersteed]
<beach> I mean, it turns out that the slowness of my code is due to it calling the SBCL compiler.
<Shinmera> right, ok
<beach> And no compiler stuff shows up in the report.
<beach> I should have guessed. This is not the first time I have been bitten by this problem.
attila_lendvai has joined #commonlisp
drz has joined #commonlisp
Cymew has quit [Ping timeout: 240 seconds]
danse-nr3 has quit [Remote host closed the connection]
danse-nr3 has joined #commonlisp
trocado has joined #commonlisp
attila_lendvai has quit [Ping timeout: 240 seconds]
zxcvz has joined #commonlisp
dcb has joined #commonlisp
dcb has quit [Client Quit]
waleee has quit [Ping timeout: 272 seconds]
alphacentauri has quit [Quit: WeeChat 4.0.5]
alphacentauri has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
X-Scale has joined #commonlisp
liminality has quit [Read error: Connection reset by peer]
rogersm has joined #commonlisp
liminality has joined #commonlisp
chrcav has joined #commonlisp
X-Scale has quit [Quit: Client closed]
notzmv has quit [Ping timeout: 240 seconds]
dino_tutter has quit [Ping timeout: 252 seconds]
Gleefre has joined #commonlisp
danse-nr3_ has joined #commonlisp
<Gleefre> bike: I think that 3.4.11 should take precedence here. It doesn't talk about doc-strings **before** a declare, but about their "Syntactic Interaction"
<Gleefre> Also note that pages for defun and alike all have a reference to section 3.4.11 in their "See Also"
danse-nr3 has quit [Ping timeout: 245 seconds]
<beach> Gleefre: Am I right in thinking that you want more than one documentation string to be valid syntax?
<bike> all the pages link it because it's relevant to all of them since they accept docstrings and declarations
<bike> and it does talk about docstrings before a declare: "where a documentation string is permissible and is not followed by either a declare expression or"
<Gleefre> Yes, but not specifically about docstrings beforea declare
<Gleefre> It also says "The consequences are unspecified if more than one such documentation string is present.
<bike> but "such" means a documentation string that _is_ followed by a declare or form.
<beach> Gleefre: That means that a program that has more than one documentation string is not conforming.
<bike> not just docstrings in general.
<Gleefre> beach: Yes, that's what I think is the case
<Gleefre> Further more, CLISP does signal an error on such definitions
<beach> Gleefre: So what is the problem?
<bike> clisp has some conformance problems.
<bike> there's a special command line switch for ansi and everything
<bike> beach: i think gleefre thinks that (defun foo () "a" "b" ...) is invalid.
<Gleefre> bike: it does signal an error with -ansi flag
<beach> Oh! That is definitely valid.
jrx has joined #commonlisp
<bike> still think that's more clisp's problem than anything.
<Gleefre> I think that it is not.
<Gleefre> Also, the behavior among many implementations vary
<bike> which is a good reason to not take "this implementation does X" to mean "the standard says X"
<beach> Gleefre: Implementations don't determine the standard.
<Gleefre> beach: The initial problem was with alexandria's parse-body which doesn't allow to parse such bodies [ AND parse docstrings at the same time ]
<beach> What does it mean for it to "parse the docstring"?
<Gleefre> Yes, standard is not determined by implementations, but it does mean somthing when implementations have different behavior - that this case is either poorly specified or is just unspecified.
<jrx> Hi all. just a quick question regarding SLY stickers in emacs : when a condition like JUST-BEFORE-STICKER has been signalled and restarts are proposed, how can I see the current values of my *local* variables in the function currently debugged ?
<bike> i would not call 3.4.11 the clearest bit of the standard, certainly
dcb has joined #commonlisp
<beach> Gleefre: It means that the maintainer didn't read the standard carefully.
<Gleefre> beach: alexandria:parse-body returns "stripped" body, declarations and docstring. The latter is only parsed when you provide :documentation T, but it signals an uncontinuable error if multiple docstrings are present.
<beach> Gleefre: It is underspecified in that it doesn't say what happens when there are multiple documentation strings.
<jrx> When I call 'e' (eval in frame) to inspect local variable i, it tells me "The variable COMMON-LISP::I is unbound."
<Gleefre> No, it does say - that the behavior is unspecified. Which means that it should not be used in conforming programs.
tyson2 has joined #commonlisp
<beach> Gleefre: When it says that it is unspecified, it doesn't say what happens.
<Gleefre> Sure
notzmv has joined #commonlisp
<beach> Gleefre: (defun foo () "a" "b") definitely valid. The page you cited implies that "a" is in a place where a documentation string is permitted, and it is followed by a form (i.e, "b"), so it is taken to be a documentation string.
alphacentauri has quit [Quit: WeeChat 4.0.5]
<Gleefre> Yes. But (defun foo () "a" "b" "c") may be not [ or may be - implementation dependent ]
<beach> Gleefre: It is valid as well.
<beach> Gleefre: "a" is in a position where a documentation string is allowed, and it is followed by a form, in fact by two forms.
<beach> Gleefre: I think Alexandria does what it does because it also parses bodies where no documentation is allowed.
<Gleefre> No, that wouldn't make sense?.. It errors only if two doc-strings are there, not if one
<Gleefre> And without :documentation t it treats strings as code
<beach> Gleefre: So by supplying a true value for :DOCUMENTATION, you are telling Alexandria that you are giving it a body where documentation is allowed.
azimut has joined #commonlisp
<beach> Gleefre: It is possible that the Alexandria function is buggy. Can you give the precise example where you think that is the case?
alphacentauri has joined #commonlisp
<Gleefre> It is not buggy, but instead it just is not very flexible
<beach> In what way is it not flexible?
<Gleefre> (parse-body '("a" "b" "c") :documentation t) will signal an uncontinuable error
rgherdt has quit [Ping timeout: 264 seconds]
<Gleefre> It could provide an key argument :if-duplicate-doc-string ; or signal a continuable error and provide various restarts
<gilberth> When I look at the grammar given with e.g. DEFUN <https://novaspec.org/cl/f_defun> (defun foo () "a" "b" c") can be parsed having exactly one documentation string just fine. I always read the "multiple documentation strings is UB" passage as speaking about the case (defun foo () "a" (declare ...) "b" (declare ...) ...).
<ixelp> defun | Common Lisp Nova Spec
<gilberth> After all "b" is a perfectly fine form, no?
<beach> I agree with gilberth.
<Gleefre> You could say that (declare ...) is a perfectly fine form and must signal a run-time error that DECLARE is not defined
<beach> And SBCL gives a warning for (defun foo () "a" "b" "c") which I don't think is right.
<Gleefre> The extended bnf form like that - [[ declaration* | documentation ]] form* - doesn't necesseraly has a single interpretation.
<beach> Gleefre: No (DECLARE ...) is NOT a form.
<Gleefre> It is a form.
<beach> It is not.
<Gleefre> Why?
<beach> Gleefre: "form" implies evaluation, and (DOCUMENTATION expressions) are not evaluated.
<beach> Er, (DOCUMENTATION ...) expressions are not evaluated.
<Gleefre> evaluated or not - this is defined based on semantics
<Gleefre> In itself (declare ...) is a form just like anything else
<beach> Gleefre: But the standard mentions "form" and DECLARE expressions are not forms.
<beach> It is not.
<beach> Gleefre: Read the glossary entry for "form".
<Gleefre> If you do (progn (declare ...)) -- (declare ...) is treated as a form. form* is defined as an implicit progn. Thus (declare ...) would be a perfectly fine form.
_cymew_ has quit [Ping timeout: 240 seconds]
<beach> PROGN does not accept declarations so that is invalid syntax.
<Gleefre> Also, an extended bnf form like that - [[ declaration* | documentation ]] form* - doesn't necesseraly has a single interpretation, so the 3.4.11 should take precedence as it is the only place (I was able to find) that describes wether a form is treated as doc-string or not.
<Gleefre> beach: no, (progn (declare)) is not an invalid syntax. It should, however, signal a run-time error that DECLARE is not a function
<beach> Gleefre: (progn (declare)) is invalid syntax.
<beach> Gleefre: PROGN does not allow declarations, and DECLARE expressions are not forms.
<beach> Gleefre: Read the glossary entry for "form".
<Gleefre> form - any object meant to be evaluated
<Gleefre> Evaluation rules can be applied to '(declare)
<beach> They can not.
igemnace has quit [Remote host closed the connection]
<Gleefre> They can - it is handled in 3.1.2.1.2
<Gleefre> Anyway, gtg now, will read IRC logs later
<beach> It is not handle there.
<bike> in (progn (declare)), (declare) is syntactically a form, since in progn syntax everything is a form. it's not a valid form, so the compiler could signal a warning or error, but still
<beach> Gleefre: DECLARE is neither the name of a function, of a special operator, nor of a macro.
<bike> but if you have a declare expression at the head of a defun or whatever it's not a form
<beach> Gleefre: If you look in the symbol index under DECLARE, it says "Symbol", not "Function", "Special operator", "Macro", nor "Accessor".
<bike> i suppose you could decide that technically by saying that the [[declaration* | documentation]] thing is a greedy match
<bike> i don't know if that's written anywhere, but not doing that would be kind of silly, because then an implementation could decide that no declaration or documentation is allowed and anything that looks like them is a form
X-Scale has joined #commonlisp
<beach> This is a very strange discussion. Clearly if you don't accept the terminology of the standard, then dictionary entries can be interpreted any old way.
<beach> Maybe literal strings are not forms, then, after all.
<bike> well, i mean, i think (declare ...) can be a form similar to how (4) is a form in (progn (4)). it's just not a valid form. it's "meant to be evaluated" in that that's what the syntax puts it as, even if evaluating it is impossible
<bike> or (foo) being a form even if foo isn't defined as an operator anywhere
<bike> which is more like the declare case, since the only difference is that foo could be defined later
<gilberth> "(x ⟦ A | B* | C ⟧+ y) means that at most one A, any number of B’s, and at most one C can occur in any order [...]" <https://novaspec.org/cl/1_4_Definitions#sec_1_4_1_2_1>
<ixelp> 1.4 Definitions | Common Lisp Nova Spec
<beach> I am pretty sure that the mention of the word "form" in 3.4.11 excludes DECLARE expressions.
<gilberth> Hence to me the BNF ⟦ {declaration}* | documentation ⟧ says "at most one documentation, any number of declaration" and thus isn't ambigious to me.
danse-nr3_ has quit [Remote host closed the connection]
<bike> i guess there could be a question with like, (defun foo () (declare a) "a" "b" (declare b) ...). in that case my interpretation would be that (declare a) is a declaration, "a" is the docstring, "b" is a form, and (declare b) is a form (that will signal an error). since based on the BNF, "b" can't be part of the initial non-forms, and so must be a form, and so the "declaration" after it is also a form.
dinomug has joined #commonlisp
<bike> of course under my interpretation, that entire paragraph in 3.4.11 is pointless, since there's no possibility of multiple documentation strings
<gilberth> bike: With my reading of the BNF I would come up with what you described. And I happen to believe this is what 3.4.11 tries to address. Despite [[ documentation | {declaration}* ]] already saying that there can be at most one documentation [string].
amb007 has quit [Ping timeout: 258 seconds]
amb007 has joined #commonlisp
<yitzi> sbcl's parse-body appears to treat `(defun foo () (declare a) "a" "b" (declare b) ...)` as duplicate docstrings but in `(defun foo () (declare a) "a" "b" ...)` the "b" is a form.
tyson2 has quit [Remote host closed the connection]
rgherdt has joined #commonlisp
karlosz has quit [Remote host closed the connection]
dinomug has quit [Remote host closed the connection]
X-Scale has quit [Quit: Client closed]
X-Scale has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
cage has joined #commonlisp
danza has joined #commonlisp
dino_tutter has joined #commonlisp
Posterdati has quit [Ping timeout: 255 seconds]
attila_lendvai has joined #commonlisp
Posterdati has joined #commonlisp
dinomug has joined #commonlisp
danza has quit [Read error: Connection reset by peer]
jrx has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1.50)]
Inline has quit [Quit: Leaving]
rgherdt has quit [Quit: Leaving]
rgherdt has joined #commonlisp
msavoritias has quit [Remote host closed the connection]
anticrisis has joined #commonlisp
<phoe> AFAIR there is a part of CLHS that states that compiled and interpreted functions should behave the same; does anyone remember it? I'm reading 3.2.2.3 but I can't see the passage I am looking for
<phoe> clhs 3.2.2 seems to mention this by the use of the word "equivalent"
<bike> well they don't behave the same. 3.2.2.3 minimizes but does not eliminate the differences.
<bike> more precisely, compiled functions are defined to meet certain expectations (minimal compilation), and interpreted functions are just defined to not be compiled functions, so they don't have to or not have to meet those expectations
mgl has quit [Ping timeout: 260 seconds]
Inline has joined #commonlisp
dinomug has quit [Remote host closed the connection]
danza has joined #commonlisp
X-Scale has quit [Quit: Client closed]
X-Scale has joined #commonlisp
X-Scale has quit [Client Quit]
X-Scale has joined #commonlisp
ronald_ has quit [Ping timeout: 252 seconds]
ronald_ has joined #commonlisp
triffid has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
dom2 has joined #commonlisp
bendersteed has joined #commonlisp
bendersteed has quit [Client Quit]
waleee has joined #commonlisp
danza has quit [Ping timeout: 255 seconds]
X-Scale has quit [Ping timeout: 245 seconds]
cage has quit [Quit: rcirc on GNU Emacs 29.1]
X-Scale has joined #commonlisp
X-Scale has quit [Quit: Client closed]
zxcvz has quit [Quit: zxcvz]
shka has quit [Ping timeout: 255 seconds]
Gleefre has joined #commonlisp
<Gleefre> bike: I'm reading 3.4.11 as the definition of what is treated as a documentation string when both declarations and documentation are allowed in the body. The BNF indeed says that there is no possibility of multiple doc strings in a **syntactically valid** body. It does not define what happens if there are multiple doc strings. And the 3.4.11 says that it is unspecified behavior.
<bike> i mean what i'm saying is that you kind of can't have a syntactically invalid body, i guess. once you have one docstring, any later literal strings are just forms.
<Gleefre> But in this case the definition of what is documentation string given in 3.4.11 wouldn't make any sense. But I understand what you mean now, yes.
<bike> yeah like i said it would make 3.4.11 redundant. but i really don't see much value in having extra convoluted rules
<phoe> bike: is a function allowed to behave differently based on whether it's compiled or interpreted, other than for the effects mentioned in 3.2.2.2?
alexsotodev has quit [Ping timeout: 248 seconds]
<Gleefre> I think it might be there to allow implementations to parse all declarations in cases like these: (defun foo () "a" (declare) "b" (declare) ...)
<bike> phoe: i would say no, but i don't think the standard is very specific about it. i have some of my own ideas about how it ought to be defined, but those are my ideas, not the standard.
<Gleefre> But then also this issue exists, which unfortunately doesn't has any write-up :/ https://www.cliki.net/site/HyperSpec/Issues/iss097-writeup.html
<bike> i don't know that there's anything more specific than that "equivalent"
<ixelp> CLHS: Issue DECLS-AND-DOC Writeup
<phoe> bike: OK; thanks
<Gleefre> Is it bad practice to define restarts with keyword names or it is just uncommon?
<Gleefre> Was able to find them only in some tests in mcclim
<phoe> uncommon, I guess? I'd rather avoid defining things on keywords because they're a shared resource
<Gleefre> But there are plenty of restarts with names in #:cl package
<Gleefre> Which are also a shared resource
rtypo has quit [Ping timeout: 252 seconds]
<Gleefre> Examples would be ABORT, USE-VALUE, IGNORE and probably others
mgl has joined #commonlisp
<phoe> the thing is that when you (invoke-restart 'abort) then you know what you want to do, and programmers define behavior that follows the menaing of that restart
<phoe> same with USE-VALUE
<phoe> not the same with IGNORE because CL:IGNORE does not exist
<phoe> I mean err the restart CL:IGNORE
<phoe> but then again, I think I see your point; for any restarts that are not standardized it's gonna be free for all
<phoe> especially since the debugger usually doesn't show package names when showing restarts, so :FOO, CL-USER::FOO, MYPKG:FOO are all going to look the same
<Gleefre> Yes. It would seem like most restarts are not meant to be programatically invoked anyways
<Gleefre> Why I'm asking - I want to define a few restarts: abort, ignore and overwrite. While first two are #:cl symbols, the latter one is not, so I'd need to export the last one. But then it wouldn't make sense to define first two in #:cl pacakge, but it would then cause weird names or name conflicts [ so the package becomes unusable ].
mgl has quit [Ping timeout: 245 seconds]
<Gleefre> And it is even more painful because I want to do that in #:alexandria package :/
<Gleefre> So using keyword symbols as restart names would seem like a great solution, but it seems like they aren't used anywhere. So I asked here..
<Gleefre> I guess I should just ask alexandria maintainers now
mgl has joined #commonlisp
<phoe> dunno
X-Scale has joined #commonlisp
<phoe> I'd go for symbols available in alexandria, which means CL:ABORT, CL:IGNORE, and, hmmm
<phoe> what is OVERWRITE supposed to do? what's the context?
triffid has quit [Remote host closed the connection]
Pixel_Outlaw has joined #commonlisp
<Gleefre> So it is the function PARSE-BODY I was talking about earlier
triffid has joined #commonlisp
drz has quit [Quit: Konversation terminated!]
<phoe> ohh, in context of multiple documentation strings?
<Gleefre> I looked at what various implementations do when a duplicate doc string occured, and aside from sbcl and clisp some of them use the last one as the "final" doc string and some use the first one
<Gleefre> Then also clisp just errors, and sbcl gives a warning and "abort"s the parsing (iirc 1-2 other implementations also stop parsing the body at this moment)
<phoe> bind the list of all N found documentation strings to some variable, make it available in the dynamic extent of the restart, allow the user to choose the one to get picked by invoking your restart that accepts an integer 1..N
<phoe> where the integer is optional and has i.e. 1 as a default
alip has quit [Quit: The Way is limitless, so nature is limitless, so the world is limitless, and so I am limitless. For I am abstracted from the world, the world from nature, nature from the Way, and the Way from what is beneath abstraction.]
<Gleefre> Hm, that would make the "abort" restart impossible without lots of additional work
<phoe> what does the ABORT restart do in this context?
pve has quit [Quit: leaving]
<Gleefre> It would make it parse the body like that: '("a" "b" "c") => ("b" "c") nil "a" [ body / decls / doc string ]
<Gleefre> IGNORE would parse it as ("c") nil "a"
<phoe> that isn't ABORT
<phoe> that's CONTINUE
<phoe> CL:ABORT means "get me the fuck out of here"
<Gleefre> Oh, I see.
<ixelp> CLHS: Restart ABORT
<Gleefre> Then it would be CONTINUE, IGNORE and OVERWRITE.
<Gleefre> Although I'd think that CONTINUE would continue parsing the body
<Gleefre> And ABORT just returns what it already parsed
<phoe> ABORT would not return anything
<phoe> ABORT would not return anything
<phoe> ABORT means "get me back to the nearest REPL"
<Gleefre> I see, ok
<phoe> and it's actually stated in the above page
<phoe> if anything you could bind restarts like FIRST and LAST and NTH (accepting a required argument)
<phoe> ...wait
X-Scale79 has joined #commonlisp
<ixelp> CLHS: Section 11.1.2.1.2
<phoe> I actually wonder how many libraries
X-Scale has quit [Ping timeout: 245 seconds]
<phoe> are in violation of point 18 here
<Gleefre> Hm, would "Except where explicitly allowed" be applicable in most of those cases?
<Gleefre> For example CONTINUE's (restart) page says "Some user-defined protocols may also wish to incorporate it for similar reasons."
<phoe> that means that only ABORT, CONTINUE, MUFFLE-WARNING, USE-VALUE, and STORE-VALUE are permitted
<phoe> no other standardized restarts exist
<Gleefre> So IGNORE would be in violation of point 18
<ixelp> alexandria-1/definitions.lisp · master · alexandria / alexandria · GitLab
<phoe> alexandria is non-conforming, and guess what - someone likely already depends on CL:IGNORE being *the* restart name there :D
<Gleefre> And now we have a problem, as alexandria-1 is frozen :o
<phoe> an unstoppable force meeting an immovable object
<Gleefre> ... Although it is for `define-constant` and this restart is undocumented
<Gleefre> The first one would mean that it is unlikely that someone depends on it
<phoe> the first one? what do you mean
<Gleefre> That it is only used in alexandria:define-constant
<phoe> yes, and alexandria:define-constant is exported
<Gleefre> You wouldn't write a wrapper around defconstant using alexandria:define-constant
<Gleefre> And you wouldn't wrap alexandria:define-constant in handler-bind
<phoe> hmm
triffid has quit [Remote host closed the connection]
<phoe> yes, it's likely meant for interactive use
<Gleefre> And the second one is that any breakage caused would not be alexandria's problem [ if anyone cares ], as it would happen due to someone using internals of alexandria:define-constant, which are not documented
triffid has joined #commonlisp
<phoe> it's not an internal
<phoe> restarts are a part of an external interface
<Gleefre> Well, kind of?
<Gleefre> But they are not documented as well
<phoe> they're presented every time you end up in the debugger while executing alexandria's code
<mfiano> the fact that it's an inherited external CL symbol doesn't make it internal?
<phoe> in a way, restarts cannot easily be made internal just by not exporting their symbol
<phoe> because COMPUTE-RESTARTS won't care in the slightest
<phoe> and the debugger will present it along all others in the same way
<Gleefre> I think it would be safe to change the name say to :ignore, as using keywords seems to be valid, that would not change the displayed name in SLDB, and it is highly unlikely that someone uses it programmatically
<Gleefre> Do you think it is worth opening an issue for that? :o
alip has joined #commonlisp
<mfiano> Just the other day the question came up
<Gleefre> Hm, I'd think it would be enough to have a unique condition class
<Gleefre> As (invoke-restart <name>) will invoke the most "recent" one, and it seems like no restarts can be created in-between if you do (restart-case (error ...) ...)
NotThatRPG has joined #commonlisp
<mfiano> If you can ensure that that class name will not be overwritten by someone doing an otherwise just as sane or insane idea of using keyword symbols for their own conditions
<NotThatRPG> Has anyone put a buildapp-based application into a GitHub action? Hoping not to figure this all out from ground zero,..
<mfiano> Oh ok, yeah.
<mfiano> Hmm, the nesting point is a good one. I think restarts should have a suitable name and belong to the package of the condition.
<mfiano> Gleefre: Even if that is guaranteed, it would make for some potentially very difficult to understand code, I imagine.
Inline has quit [Quit: Leaving]
X-Scale79 has quit [Ping timeout: 245 seconds]
anticomputer_ has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
trocado has quit [Remote host closed the connection]
rgherdt has quit [Quit: Leaving]
X-Scale has joined #commonlisp
habamax has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]
gooba has quit [Remote host closed the connection]
gooba has joined #commonlisp
jonatack has quit [Read error: Connection reset by peer]
jonatack has joined #commonlisp
dino_tutter has quit [Ping timeout: 240 seconds]
random-jellyfish has quit [Ping timeout: 245 seconds]
donleo has quit [Ping timeout: 255 seconds]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
random-nick has quit [Ping timeout: 240 seconds]