<phoe>
pjb: which part is the "nope" aimed towards?
<pjb>
since when you use the restart to set the PLACE, (not the value DUH!), check-type CHECKS AGAIN the same type, until you provide a value that bound to that place that checks the type.
<phoe>
pjb: I meant (lambda (x) (check-type x number) (setf x (prin1-to-string x)) (check-type x string))
<pjb>
oh, this way, yes.
<_death>
phoe: check-type takes a place, but it only ensures that it contains a value of that type after the form is evaluated, not that it remains so
<phoe>
yes
<_death>
phoe: you could have an operator like with-checked-type that also has a locally
<pjb>
But the compiler may compile it to something equivalent to: (lambda (x) (check-type x number) (locally (declare (type number x)) … (locally (declare type t x) (setf x (prin1-to-string x)) (check-type x string) (locally (declare (type string x)) …))))
<pjb>
which you may also write yourself, as a compact form of my previous foo / %foo example.
<_death>
but this does not conflict with correctable error behavior
<pjb>
Of course not.
<pjb>
this is the only sane way to use type declarations. Checking them (or PROVING them) before.
<phoe>
pjb: do you have (locally (declare (type number x)) (locally (declare (type t x)) ...)) in there?
<pjb>
Yes. Before assigning to X, you must accept any type of value!
<phoe>
" If nested type declarations refer to the same variable, then the value of the variable must be a member of the intersection of the declared types."
<pjb>
(unless you've proven the function returns a number, which prin1-to-string does not.
<pjb>
)
<phoe>
this won't work
<pjb>
phoe: oops :-(
<pjb>
well, well, well, this makes type declarations even more useless than I thought…
<pjb>
This doesn't prevent some magic on the part of the compiler when processing check-type, but it makes it more difficult than a simple rewrite of the bodies.
<pjb>
People using type declarations in CL are crazy.
<phoe>
nah, they just manage to enforce type discipline
<phoe>
I assume the compiler can make its reasoning when it detects that a lexivar is never written to after its initial binding, or when the writes are of known types
peterhil has quit [Quit: Leaving]
coat has joined #commonlisp
susam has left #commonlisp [#commonlisp]
seletz has joined #commonlisp
gin has left #commonlisp [#commonlisp]
ttree has quit [Read error: Connection reset by peer]
seletz has quit [Ping timeout: 260 seconds]
dra_ has joined #commonlisp
dra has quit [Ping timeout: 246 seconds]
coat has left #commonlisp [#commonlisp]
dipper_ has joined #commonlisp
Oladon has joined #commonlisp
peterhil has joined #commonlisp
pve has quit [Quit: leaving]
ClickHacker has quit [Read error: Connection reset by peer]
ClickHacker has joined #commonlisp
speskk has joined #commonlisp
speskk has quit [Changing host]
speskk has joined #commonlisp
masinter has quit [Ping timeout: 272 seconds]
masinter has joined #commonlisp
bilegeek has joined #commonlisp
bilegeek has quit [Quit: Leaving]
morganw has quit [Remote host closed the connection]
coyotea has joined #commonlisp
attila_lendvai has quit [Ping timeout: 272 seconds]
Oladon has quit [Quit: Leaving.]
random-nick has quit [Ping timeout: 255 seconds]
dra_ has quit [Ping timeout: 255 seconds]
speskk has quit [Ping timeout: 272 seconds]
<Spawns_Carpeting>
is the trivia pattern matching library pretty widely used among the CL people
tyson2 has quit [Remote host closed the connection]
coyotea has quit [Remote host closed the connection]
coyotea has joined #commonlisp
travv0 has joined #commonlisp
coyotea has quit [Ping timeout: 260 seconds]
<hayley>
I use it quite frequently.
blihp has joined #commonlisp
tyson2 has joined #commonlisp
chrcav has quit [Quit: Lost terminal]
skempf is now known as kabriel
kabriel is now known as Kabriel
johnjaye has quit [Read error: Connection reset by peer]
akoana has joined #commonlisp
<hayley>
Only one issue, which you might not hit any time soon, which is that attempting to write a pattern which matches some predicate, when the predicate does not correspond to any type, signals full warnings. Thus I have to leave some logic outside of patterns, as from memory Quicklisp will not accept systems which signal full warnings when built.
Kabriel is now known as pjb`
pjb` is now known as Kabriel
chrcav has joined #commonlisp
dipper_ has quit [Remote host closed the connection]
dipper_ has joined #commonlisp
Kabriel is now known as skempf
coyotea has joined #commonlisp
terrorjack has quit [Ping timeout: 246 seconds]
terrorjack has joined #commonlisp
<Spawns_Carpeting>
is this something that would be less of an issue when not using quicklisp?
<Spawns_Carpeting>
that is my understanding since i can just ignore warnings
tyson2 has quit [Remote host closed the connection]
<Bike>
asdf and slime will also, by default, report failure if compilation hits a full warning
<Bike>
you can load the fasl anyway and configure this stuff away, but it will be a little annoying
asarch has joined #commonlisp
coyotea has quit [Quit: Leaving]
seletz has joined #commonlisp
seletz has quit [Ping timeout: 272 seconds]
<jasom>
I seem to recall there was some site that had a table with QL packages in rows and CL implementations in columns and said whether or not they succesfully loaded?
gateway2000 has quit [Remote host closed the connection]
lispnik has joined #commonlisp
masinter has quit [Remote host closed the connection]
gateway2000 has joined #commonlisp
Oladon has joined #commonlisp
lispnik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
corinroyal has quit [Remote host closed the connection]
aartaka has joined #commonlisp
Oladon has quit [Read error: Connection reset by peer]
Oladon has joined #commonlisp
igemnace has joined #commonlisp
hamza has joined #commonlisp
hamza has left #commonlisp [#commonlisp]
seletz has joined #commonlisp
seletz has quit [Ping timeout: 255 seconds]
Oladon has quit [Quit: Leaving.]
rgherdt has joined #commonlisp
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
Cymew has joined #commonlisp
MajorBiscuit has joined #commonlisp
<remexre>
is there a non-gross way to "pass a place" to a function? not thrilled with passing a cons or making the function a macro, but I suppose I wouldn't hate making a single-field record?
<remexre>
not ideal, ofc
<hayley>
I've used a function e.g. (lambda (x) (setf <some place> x)) before to represent a place.
<phoe>
remexre: depends on your use case, I'd pass a locative if I absolutely need to - so what hayley said
<remexre>
OK, I'll do that then, thx
<hayley>
ywlcm
seletz has joined #commonlisp
seletz has quit [Ping timeout: 260 seconds]
shka has joined #commonlisp
pve has joined #commonlisp
Cymew has quit [Ping timeout: 268 seconds]
<aeth>
if you want something like a cons, you can also make a zero dimensional array or a one-dimensional array of length 1
<aeth>
you can use symbol-macrolet or with-accessors to make it seem like it's a variable when it's an accessor
chrcav has quit [Ping timeout: 272 seconds]
<Nilby>
there's a style of encapsulating state in dynamic objects which tends to elimitate most needs for locatives or passing places
<Nilby>
and make things friendly for multiple thread instances
<pjb>
remexre: of course, you wouldn't do that a lot in a lisp program, otherwise, you'd be back to C (almost). But occasionnaly, this can be useful. Or just write the closures explicitely (the lambdas).
varjag has quit [Ping timeout: 256 seconds]
waleee has quit [Ping timeout: 252 seconds]
varjag has joined #commonlisp
waleee has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
genpaku has quit [Read error: Connection reset by peer]
random-nick has joined #commonlisp
genpaku has joined #commonlisp
waleee has quit [Quit: WeeChat 3.7.1]
varjag has quit [Ping timeout: 272 seconds]
attila_lendvai has joined #commonlisp
tyson2 has joined #commonlisp
attila_lendvai has quit [Ping timeout: 246 seconds]
g0zar has joined #commonlisp
dipper_ has quit [Remote host closed the connection]
dipper_ has joined #commonlisp
dipper_ has quit [Remote host closed the connection]
random-nick has quit [Ping timeout: 268 seconds]
varjag has joined #commonlisp
speskk has joined #commonlisp
speskk has joined #commonlisp
speskk has quit [Changing host]
varjag has quit [Ping timeout: 252 seconds]
Reinhilde is now known as MelMalik
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
jmdaemon has quit [Ping timeout: 252 seconds]
chrcav has joined #commonlisp
speskk has quit [Quit: Bye.]
sedzcat has quit [Ping timeout: 260 seconds]
attila_lendvai has joined #commonlisp
Sauvin has quit [Remote host closed the connection]
Sauvin has joined #commonlisp
pdietz has joined #commonlisp
varjag has joined #commonlisp
sedzcat has joined #commonlisp
varjag has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
cage has quit [Quit: rcirc on GNU Emacs 28.2]
akoana has quit [Quit: leaving]
MajorBiscuit has quit [Quit: WeeChat 3.6]
aartaka has quit [Ping timeout: 255 seconds]
aartaka has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
attila_lendvai has quit [Ping timeout: 268 seconds]
frgo has quit []
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
frgo has joined #commonlisp
random-nick has joined #commonlisp
morganw has joined #commonlisp
irc_user has joined #commonlisp
irc_user has left #commonlisp [#commonlisp]
attila_lendvai has joined #commonlisp
cosimone has joined #commonlisp
aartaka has quit [Ping timeout: 265 seconds]
aartaka has joined #commonlisp
Inline has joined #commonlisp
Bocaneri has joined #commonlisp
Bocaneri is now known as Guest4522
Sauvin has quit [Ping timeout: 272 seconds]
cage has joined #commonlisp
attila_lendvai has quit [Ping timeout: 272 seconds]
inline_ has joined #commonlisp
Inline has quit [Ping timeout: 272 seconds]
tevo has quit [Read error: Connection reset by peer]
tevo has joined #commonlisp
Guest4522 is now known as Sauvin
jeosol has joined #commonlisp
Inline has joined #commonlisp
inline_ has quit [Ping timeout: 256 seconds]
inline_ has joined #commonlisp
cosimone has quit [Ping timeout: 246 seconds]
Inline has quit [Ping timeout: 272 seconds]
Inline has joined #commonlisp
inline_ has quit [Ping timeout: 268 seconds]
azimut has quit [Ping timeout: 255 seconds]
masinter has joined #commonlisp
cage has quit [Remote host closed the connection]
cage has joined #commonlisp
inline_ has joined #commonlisp
Inline is now known as Guest3501
Guest3501 has quit [Killed (copper.libera.chat (Nickname regained by services))]
inline_ is now known as Inline
tyson2` has joined #commonlisp
tyson2 has quit [Read error: Connection reset by peer]
tyson2` has quit [Read error: Connection reset by peer]
aartaka has quit [Ping timeout: 246 seconds]
aartaka has joined #commonlisp
jmdaemon has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
Devon has joined #commonlisp
Lord_Nightmare has quit [Ping timeout: 256 seconds]
tyson2 has joined #commonlisp
mariari has quit [Ping timeout: 272 seconds]
inline_ has joined #commonlisp
Inline has quit [Killed (zirconium.libera.chat (Nickname regained by services))]
inline_ is now known as Inline
Inline is now known as Guest139
Guest139 has quit [Killed (osmium.libera.chat (Nickname regained by services))]
Inline has joined #commonlisp
mariari has joined #commonlisp
ebrasca has joined #commonlisp
peterhil has quit [Ping timeout: 246 seconds]
Inline is now known as Guest5029
Guest5029 has quit [Killed (calcium.libera.chat (Nickname regained by services))]
Inline has joined #commonlisp
igemnace has quit [Remote host closed the connection]
scymtym has joined #commonlisp
splatt990 has quit [Remote host closed the connection]
Devon has quit [Ping timeout: 256 seconds]
Brucio-61 has joined #commonlisp
scymtym_ has joined #commonlisp
scymtym has quit [Ping timeout: 252 seconds]
scymtym_ is now known as scymtym
inline_ has joined #commonlisp
Inline has quit [Ping timeout: 252 seconds]
sedzcat has quit [Quit: sedzcat]
sedzcat has joined #commonlisp
sedzcat has quit [Quit: sedzcat]
varjag has joined #commonlisp
Lord_Nightmare has joined #commonlisp
inline_ has quit [Ping timeout: 272 seconds]
pranavats has left #commonlisp [Error from remote client]
Odeqlmd has joined #commonlisp
chrcav has quit [Ping timeout: 268 seconds]
cage has quit [Quit: rcirc on GNU Emacs 28.2]
rgherdt has quit [Remote host closed the connection]