<contrapunctus>
phoe: there's a defect in the solution I linked, though...it assumes that the user is only using one transaction log throughout the application. Perhaps I should replace the special variable with a hash table of files and transaction-log instances?
Cymew has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
Brucio-61 has joined #commonlisp
epony has quit [Remote host closed the connection]
scymtym has joined #commonlisp
<beach>
Suppose the compiler detects some incorrect code, say a class name that is not a non-NIL symbol. What kind of condition should it signal? It seems to me that it could be both a PROGRAM-ERROR and a TYPE-ERROR. If so, would it make sense to define a condition type with both those two types as supertypes?
<beach>
scymtym: Since you have been working on S-expression syntax, perhaps you have some opinion here?
<scymtym>
beach: will read later, heading into a meeting now
<beach>
No rush.
jeosol has quit [Ping timeout: 252 seconds]
<beach>
The thing, of course, is that many error situations can be thought of as TYPE-ERRORs, simply because a type in Common Lisp is just a set of objects. So any situation in which an object that is a member of some set is expected, but a different object is found can be thought of as a TYPE-ERROR.
<beach>
But expressing it that way can become quite convoluted.
<beach>
CLASS-OPTION, for instance, could be expressed as (or (cons (eql :default-initargs) (satisfies initargslist)) (cons (eql :documentation) (cons string null)) (cons (eql :metaclass) (cons symbol null))) or something like that.
<beach>
But I am not sure I would want to report an error in terms of such a type.
<beach>
So I guess I am looking for some insight here. Like in combination with a program error, "never use TYPE-ERROR for the following reason", or "Use TYPE-ERROR only when the type can be expressed in a simple way".
<beach>
Or, "do express it as a TYPE-ERROR even when the type is hard to specify, but provide a custom condition reporter that expresses it in a simpler way". This possibility could be useful for code that processes the condition programatically.
azimut has quit [Write error: Connection reset by peer]
triffid has quit [Write error: Connection reset by peer]
anticomputer_ has quit [Read error: Connection reset by peer]
anticomputer has joined #commonlisp
triffid has joined #commonlisp
azimut has joined #commonlisp
<beach>
In case of CLASS-OPTION, the type could also be expressed as (SATISFIES CLASS-OPTION) of course, which is simple in some respects.
Dynom_ has joined #commonlisp
Dynom_ is now known as Guest7779
razetime has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
amb007 has quit [Ping timeout: 252 seconds]
pranavats has joined #commonlisp
makomo has quit [Ping timeout: 252 seconds]
pjb has joined #commonlisp
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
jeosol has joined #commonlisp
pillton has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
Cymew has quit [Ping timeout: 255 seconds]
aartaka has quit [Ping timeout: 255 seconds]
aartaka has joined #commonlisp
pjb has quit [Ping timeout: 255 seconds]
pranavats has left #commonlisp [Error from remote client]
<scymtym>
beach: PROGRAM-ERROR seems to be the important one. i don't see a significant benefit in making such errors TYPE-ERRORs. as the CLASS-OPTION example illustrates, the information that "SOME-EXPRESSION is not of type (satisfies class-option)" is not the most precise description of the problem
<scymtym>
a dedicated condition type that is a subtype of PROGRAM-ERROR in the spirit (but not name) of S-EXPRESSION-SYNTAX-ERROR and contains the offending expression or expressions (maybe as CSTs) seems better to me. particular errors such as repeated class options could be represented as subtypes of S-EXPRESSION-SYNTAX-ERROR and provide specific error reports and possibly additional readers (say FIRST-OCCURRENCE, SECOND-OCCURRENCE for a
<scymtym>
repeated option)
<beach>
Thanks.
amb007 has joined #commonlisp
<beach>
My current thinking is to forget about the issue specifically for SICL, and perhaps bite the bullet and use the s-expression-syntax library instead.
<beach>
I am currently checking out that library. I looked at it briefly some time ago, but maybe this is a good time to do it again.
<scymtym>
i see
<beach>
I suppose I could use your library "incrementally", like convert the current method for a particular form to use your library instead.
<scymtym>
sure, you could "call into" a particular grammar rule if you already know the operator
amb007 has quit [Ping timeout: 255 seconds]
<beach>
Yeah, and if I find an issue with a particular operator, I can always do it the way I do it now for that particular operator.
<beach>
But it would be even better if I could help make the library complete of course.
<scymtym>
right
McParen has joined #commonlisp
<beach>
I remember last time I looked, I was a bit stumped by the dependencies, but maybe I just need to find a better way of structuring my attempt to understand it.
<scymtym>
in can probably improve the dependency situation a little bit, but some complexity would remain
<beach>
Sure. But if i were you, I wouldn't bother at this point.
razetime has quit [Ping timeout: 268 seconds]
razetime has joined #commonlisp
<scymtym>
there are some low hanging fruit (let-plus) but i indeed wouldn't re-architect things or anything of that sort
<beach>
I think you mentioned let-plus in the past, but it's a pretty small issue anyway.
<beach>
Let me start by checking how far I get this time before you spend time on this.
<scymtym>
ok
iceman[m] is now known as iceman
iceman is now known as iceman[m]
jaimelm has joined #commonlisp
attila_lendvai has joined #commonlisp
even4void[m] has left #commonlisp [#commonlisp]
amb007 has joined #commonlisp
random-nick has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
occ has quit [Ping timeout: 268 seconds]
thuna` has joined #commonlisp
<beach>
scymtym: I think your code can be understood without any detailed knowledge of LET+. You use only a small number of cases it seems.
<beach>
But yeah, that dependency might not be very justified, especially since the library is explicitly labeled "unmaintained".
<beach>
But that also means that LET+ could be gotten rid of fairly easily if there is a problem one day.
<scymtym>
flip214: i haven't looked at this in a while but i guess in lines 10 and 11, VALUE would have to be LET-PLUS::VALUE
amb007 has joined #commonlisp
<flip214>
scymtym: yeah, right. Either VALUE needs to be exported (which is bad) or the README needs fixing. (also LET-PLUS::BODY, BTW)
<beach>
I think the README has several issues.
<flip214>
I pushed a PR for two of them already
<flip214>
*sent a PR
<beach>
It says the library is unmaintained, so don't hold your breath.
<flip214>
well, is there something similar that is maintained?
<flip214>
Haven't used it yet, but it looks convenient
<beach>
Like it says: binding ::= symbol || (form [init-form]) but those are not forms that are then described.
<beach>
In fact, they are specifically NOT forms.
<beach>
It took me several minutes to realize that the wrong terminology is used.
<beach>
Then the "form" (list value) is given, but the following example does not contain it.
amb007 has quit [Ping timeout: 268 seconds]
<beach>
etc, etc.
<flip214>
yeah... the examples help quite a bit, though ;)
<beach>
Oh, wait, LIST is a metasyntactic variable here. Sorry.
<beach>
So then, &slots should not be in italic font.
<beach>
Anyway, I am not going to spend more time on it. I looked at it only to understand the code in s-expression-syntax.
<jcowan>
beach: I think it's a good general principle that if PROGRAM-ERROR is applicable, the condition should not be stuffed under the TYPE-ERROR rug. Consider this (at the top level): (TAGBODY :A (PRINT "this") :B ("print that") (GO NOGO)). This is explicitly said to be a PROGRAM-ERROR in the CLHS. It could also be expressed as a TYPE-ERROR where the type is (OR (EQL :A) (EQL :B)). But I do not think this is informative to anybody.
tyson2 has joined #commonlisp
pranavats has joined #commonlisp
amb007 has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
_cymew_ has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
cage has joined #commonlisp
pranavats has joined #commonlisp
Colere has quit [Ping timeout: 260 seconds]
Cymew has joined #commonlisp
m5zs7k has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
Colere has joined #commonlisp
waleee has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
<Devon>
phoe: Thanks. Can trivia be told to notice fill pointers?
jeosol has quit [Ping timeout: 252 seconds]
epolanski has joined #commonlisp
azimut has quit [Ping timeout: 258 seconds]
azimut has joined #commonlisp
igemnace has quit [Remote host closed the connection]
razetime has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 252 seconds]
makomo has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
makomo_ has joined #commonlisp
epony has joined #commonlisp
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
epolanski has quit [Quit: Connection closed for inactivity]
amb007 has joined #commonlisp
lottaquestions has joined #commonlisp
Guest58 has joined #commonlisp
Guest58 has quit [Client Quit]
Guest58 has joined #commonlisp
Guest58 has quit [Client Quit]
amb007 has quit [Ping timeout: 252 seconds]
epony has quit [Remote host closed the connection]
epony has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
orestarod has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
comatory_ has quit [Ping timeout: 260 seconds]
comatory_ has joined #commonlisp
eddof13 has joined #commonlisp
thomaslewis has joined #commonlisp
ec has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
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
ttree has joined #commonlisp
amb007 has joined #commonlisp
ec has quit [Quit: ec]
aartaka has quit [Ping timeout: 255 seconds]
aartaka has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
thomaslewis has joined #commonlisp
Lord_Nightmare has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
tyson2 has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
thomaslewis has joined #commonlisp
comatory_ has quit [Ping timeout: 260 seconds]
thomaslewis has left #commonlisp [#commonlisp]
comatory_ has joined #commonlisp
jeosol has joined #commonlisp
ec has joined #commonlisp
comatory_ has quit [Ping timeout: 268 seconds]
comatory_ has joined #commonlisp
tane has quit [Quit: Leaving]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
igemnace has quit [Remote host closed the connection]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
ec has quit [Ping timeout: 258 seconds]
triffid has quit [Ping timeout: 258 seconds]
anticomputer has quit [Ping timeout: 258 seconds]
karlosz_ has joined #commonlisp
orestarod has quit [Ping timeout: 244 seconds]
azimut has quit [Ping timeout: 258 seconds]
karlosz has quit [Ping timeout: 260 seconds]
karlosz_ is now known as karlosz
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
anticomputer has joined #commonlisp
triffid has joined #commonlisp
azimut has joined #commonlisp
ec has joined #commonlisp
karlosz_ has joined #commonlisp
karlosz has quit [Ping timeout: 255 seconds]
karlosz_ is now known as karlosz
amb007 has joined #commonlisp
Devon has quit [Ping timeout: 268 seconds]
karlosz has quit [Read error: Connection reset by peer]
karlosz has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
azimut has quit [Ping timeout: 258 seconds]
karlosz_ has joined #commonlisp
morganw has joined #commonlisp
karlosz has quit [Ping timeout: 244 seconds]
karlosz_ is now known as karlosz
karlosz_ has joined #commonlisp
karlosz has quit [Ping timeout: 252 seconds]
karlosz_ is now known as karlosz
jolby has joined #commonlisp
karlosz has quit [Read error: Connection reset by peer]
karlosz_ has joined #commonlisp
karlosz_ is now known as karlosz
comatory_ has quit [Ping timeout: 255 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
comatory_ has joined #commonlisp
eddof13 has joined #commonlisp
pjb has joined #commonlisp
comatory_ has quit [Ping timeout: 255 seconds]
klm2is has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
jolby has quit [Quit: Client closed]
karlosz has quit [Quit: karlosz]
comatory_ has joined #commonlisp
karlosz_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 268 seconds]
cosimone` has quit [Ping timeout: 268 seconds]
Lord_of_Life has joined #commonlisp
jolby has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
Devon has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
_cymew_ has quit [Ping timeout: 252 seconds]
waleee has joined #commonlisp
anticomputer_ has joined #commonlisp
anticomputer has quit [Ping timeout: 258 seconds]
orestarod has joined #commonlisp
ashpool has joined #commonlisp
<ashpool>
(defvar *my-list* '(NIL B C D))
<ashpool>
(defvar *my-place* '(car *my-list*))
<ashpool>
(setf *my-place* 'A)
<ashpool>
-- how do I change the last line so that *my-list* becomes (A B C D) instead of changing the value of *my-place* to A?
zyni-moe has joined #commonlisp
orestarod has quit [Ping timeout: 268 seconds]
<Bike>
ashpool: first off, you can't modify quoted (constant) data. so you want like (defvar *my-list* (list nil 'b 'c 'd)). and to modify the first element, you'd do (setf (first *my-list*) 'a)
<Bike>
there aren't really places as objects in the way you seem to want
amb007 has joined #commonlisp
comatory_ has quit [Ping timeout: 268 seconds]
tyson2 has joined #commonlisp
<ashpool>
Bike: yeah I might've set in up incorrectly. But are you saying I can't just store a form in a variable and then use that form as a "place" to write to?
Brucio-61 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
<ashpool>
I think I almost got it with `get-setf-expansion` and then evaling the setter form but then I thought the had to be an easier way
<Bike>
ashpool: I am saying that, yes. eval won't really get you there because it is insensitive to its lexical environment.
<Bike>
ashpool: if you really really want to, you'd probably have to set up a closure - like throw around (lambda (new) (setf (car my-list) new))
<ashpool>
Right, thank you. Not that I want it really bad, but I think understanding the limitations is a good thing when learning stuff, so I just wanted to make sure
amb007 has quit [Ping timeout: 252 seconds]
<Bike>
Indeed
<Bike>
I think some predecessors to the standard language had something like first-class places - "locatives" i think