anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
lucasta has joined #commonlisp
nij- has quit [Ping timeout: 246 seconds]
nij- has joined #commonlisp
tyson2 has joined #commonlisp
Posterdati has quit [Ping timeout: 252 seconds]
Posterdati has joined #commonlisp
Cymew has joined #commonlisp
Cymew has quit [*.net *.split]
random-nick has quit [*.net *.split]
rtoy has quit [*.net *.split]
edgar-rft has quit [*.net *.split]
kagevf has quit [*.net *.split]
tasty_ has quit [*.net *.split]
minion has quit [*.net *.split]
griffinmb has quit [*.net *.split]
mariari has quit [*.net *.split]
spec has quit [*.net *.split]
pieguy128_ has quit [*.net *.split]
mzan has quit [*.net *.split]
megeve has quit [*.net *.split]
energizer has quit [*.net *.split]
fiddlerwoaroof has quit [*.net *.split]
xantoz has quit [*.net *.split]
zups has quit [*.net *.split]
conjunctive has quit [*.net *.split]
jmercouris has quit [*.net *.split]
dbotton has quit [*.net *.split]
pl has quit [*.net *.split]
eta has quit [*.net *.split]
sgithens has quit [*.net *.split]
kagevf has joined #commonlisp
tasty has joined #commonlisp
sgithens has joined #commonlisp
eta has joined #commonlisp
conjunctive has joined #commonlisp
pl has joined #commonlisp
zups has joined #commonlisp
xantoz has joined #commonlisp
jmercouris has joined #commonlisp
megeve has joined #commonlisp
griffinmb has joined #commonlisp
specbot has quit [Remote host closed the connection]
scymtym_ is now known as scymtym
dbotton has joined #commonlisp
tasty has quit [Changing host]
tasty has joined #commonlisp
random-nick has joined #commonlisp
pieguy128 has joined #commonlisp
Cymew has joined #commonlisp
mzan has joined #commonlisp
rtoy has joined #commonlisp
spec has joined #commonlisp
edgar-rft has joined #commonlisp
energizer has joined #commonlisp
mariari has joined #commonlisp
minion has joined #commonlisp
minion has quit [Remote host closed the connection]
fiddlerwoaroof has joined #commonlisp
specbot has joined #commonlisp
specbot has quit [Remote host closed the connection]
specbot has joined #commonlisp
specbot has quit [Remote host closed the connection]
specbot has joined #commonlisp
specbot has quit [Read error: Connection reset by peer]
minion has joined #commonlisp
minion has quit [Remote host closed the connection]
minion has joined #commonlisp
minion has quit [Remote host closed the connection]
minion has joined #commonlisp
specbot has joined #commonlisp
morganw has joined #commonlisp
nicm[m] has joined #commonlisp
zxcvz has joined #commonlisp
morganw has quit [Remote host closed the connection]
lucasta has quit [Remote host closed the connection]
<nij->
What does this mean?
<nij->
"An implementation is permitted to make ``copies'' of characters and numbers at any time. The effect is that Common Lisp makes no guarantee that eq is true even when both its arguments are ``the same thing'' if that thing is a character or number. " http://www.lispworks.com/documentation/HyperSpec/Body/f_eq.htm#eq
<ixelp>
CLHS: Function EQ
<Bike>
it means EQ of two EQL characters or numbers is undefined
<Bike>
(eq #\a #\a) => undefined
<nij->
(eq 1 1) => undefined too?
<Bike>
yep.
<nij->
... Wow.
<nij->
How do I make a copy of 1?
<boigahs_>
It is an implementation issue if numbers need to be copied and when and how etc
<Bike>
just like that. the implementation may or may not copy.
<Bike>
you don't really need to worry about copying unless you're concerned about the underlying operations of the implementation. the only impact on the language semantics is this EQ stuff.
<nij->
Got it. I will use = for integers in the future.
<Bike>
you can use eql too
<Bike>
(the difference being that e.g. (eql 1 1) is true but (eql 1 1.0) is false)
<char[m]>
Greetings, was all of 2023 ELS recorded? I'm not seeing the video for the second half of the last day.
bicalot has quit [Remote host closed the connection]
chrcav has joined #commonlisp
Oladon has joined #commonlisp
Bocaneri has joined #commonlisp
Bocaneri is now known as Guest1315
anticomputer has quit [Ping timeout: 240 seconds]
anticomputer has joined #commonlisp
Sauvin has quit [Ping timeout: 246 seconds]
luna-is-here_ has quit [Quit: luna-is-here_]
lucasta has joined #commonlisp
specbot has quit [Remote host closed the connection]
minion has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
minion has joined #commonlisp
minion has quit [Remote host closed the connection]
bitmapper has quit [Quit: Connection closed for inactivity]
luna-is-here has joined #commonlisp
vassenn has quit [Quit: Leaving]
Gleefre has joined #commonlisp
specbot has joined #commonlisp
specbot has quit [Remote host closed the connection]
Guest1315 is now known as Sauvin
minion has joined #commonlisp
specbot has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 28.2]
Gleefre has quit [Ping timeout: 245 seconds]
<pjb>
nij-: note that (eq 1 1) --> nil may occur rarely in implementations, but on the other hand, (eq (+ 1 2) (+ 1 2)) -> nil may occur more often.
<pjb>
nij-: eg. if the implemnetation translates it to new_integer(integer_value(one)+integer_value(two))==new_integer(integer_value(one)+integer_value(two)); Note that two new integer objects are allocated with new_integer, both having the same value, 3.
<pjb>
nij-: it is still possible to have (eq 1 1) --> nil, if eg. the implementation made new copies of integers when passing them to parameters.
nij- has quit [Ping timeout: 246 seconds]
selfish has quit [Read error: Connection reset by peer]
tevo has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
<Bike>
the semantics are pretty simply stated as i did earlier. if (eql a b) is true, (eq a b) is undefined.
<Bike>
Practically speaking, (eq 1 1) will be true in any implementation, as will the defvar thing. But the standard allows more latitude.
<Bike>
*if (eql a b) is true and a is a number or character, of course
<fiddlerwoaroof>
So, the implementation would be allowed to copy and update the instance of 1 a variable references?
<Bike>
"An implementation is permitted to make ``copies'' of characters and numbers at any time."
<char[m]>
Thanks Bike!
<fiddlerwoaroof>
But that doesn't say it's allowed to update the symbol-value of the variable
<Bike>
Who said anything about updating the symbol value? That's totally unrelated to what EQ does.
<fiddlerwoaroof>
the point of the defvar was to get a reference to a specific integer object
<Bike>
In your example, it would be something like (defvar *a* 1) (eq *a* (implicit-copy *a*))
<Bike>
nothin happens to the variable, and yet the copy is made.
<pjb>
fiddlerwoaroof: it can make the copy in the process of copying the value onto the stack, or copying it from the stack to the parameter inside the EQ function.
<pjb>
more practically, an implementation could pass characters and integers "unboxed", and therefore EQ which would work by comparing pointers, would compare ¶meter instead of the original pointer to the boxed object.
<Bike>
(here implicit-copy is a function such that (eql (implicit-copy x) x) => T but (eq (implicit-copy x) x) => NIL)
<Bike>
the whole point is really giving the implementation latitude by making it impossible to reference a specific integer object.
parjanya has quit [Ping timeout: 248 seconds]
tyson2 has joined #commonlisp
jmiven has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
akoana has joined #commonlisp
Cymew has quit [Ping timeout: 246 seconds]
jmdaemon has joined #commonlisp
euandreh has joined #commonlisp
dcb has quit [Quit: MSN Messenger v2.16.1]
dcb has joined #commonlisp
dcb has quit [Client Quit]
dcb has joined #commonlisp
dcb has quit [Client Quit]
dcb has joined #commonlisp
dcb has quit [Client Quit]
dcb has joined #commonlisp
jeosol has quit [Quit: Client closed]
jeosol has joined #commonlisp
flip214 has quit [Read error: Connection reset by peer]
azimut has quit [Ping timeout: 240 seconds]
drainpipe has joined #commonlisp
drainpipe has quit [Client Quit]
flip214 has joined #commonlisp
pve has quit [Ping timeout: 246 seconds]
rgherdt has quit [Remote host closed the connection]