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/>
JuanDaugherty has quit [Quit: JuanDaugherty]
random-nick has quit [Ping timeout: 252 seconds]
even4void has quit [Ping timeout: 264 seconds]
Akbar-Birbal has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
even4void has joined #commonlisp
spdegabrielle has quit [Quit: Connection closed for inactivity]
istewart has joined #commonlisp
occ has joined #commonlisp
deriamis_ has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
xlymian has joined #commonlisp
istewart has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
istewart has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
jonatack has joined #commonlisp
green_ has quit [Ping timeout: 255 seconds]
green_ has joined #commonlisp
semz has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
semz has joined #commonlisp
emaczen has joined #commonlisp
kg7ski- has quit [Quit: ZNC 1.8.2 - https://znc.in]
contrapunctus has joined #commonlisp
mwnaylor has quit [Ping timeout: 248 seconds]
green_ has quit [Ping timeout: 248 seconds]
waleee has quit [Ping timeout: 248 seconds]
<mrcom> aeth: That sounds like market opportunity knocking. "Aeth's House of Discount Standards" -- "All the Meat and None of the Fat"
gko has quit [Ping timeout: 252 seconds]
gko has joined #commonlisp
<mrcom> Differentiated pricing, too. "$ - You hit SUBMIT, We number it" ... "$$$ - N layers of premium review, consideration, and correction, and the extra special "$$$$ - Peer reviewed by a genuine member of the House of Lords"
mzan has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
King_julian has joined #commonlisp
terrorjack4 has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack4 has joined #commonlisp
kg7ski has joined #commonlisp
d4ryus has quit [Ping timeout: 252 seconds]
d4ryus has joined #commonlisp
deriamis_ has quit [Quit: ZNC - https://znc.in]
deriamis_ has joined #commonlisp
deriamis_ has quit [Remote host closed the connection]
deriamis_ has joined #commonlisp
char has quit [Remote host closed the connection]
decweb has quit [Ping timeout: 260 seconds]
eddof13 has joined #commonlisp
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<aeth> mrcom: so basically like an open access journal, except governments that use standards bodies are even further behind universities here
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<younder> How do you disable reader macro's?
<younder> I just can't remember.
<bike> you can set-syntax-from-char
<aeth> younder: what you mainly want is *read-eval* off
<aeth> that gets you 90% of the way and the remaining 10% is probably for things that can mostly still affect naive JSON parsers, too
Ruby has quit [Quit: ZNC - https://znc.in]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
shawnw has joined #commonlisp
Ruby has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
King_julian has quit [Ping timeout: 258 seconds]
akoana has joined #commonlisp
<younder> Thanks!
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Ruby has quit [Read error: Connection reset by peer]
Ruby has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
shawnw has quit [Ping timeout: 260 seconds]
wacki has joined #commonlisp
Pixel_Outlaw has joined #commonlisp
mgl has joined #commonlisp
shka has joined #commonlisp
deriamis has quit [Quit: ZNC - https://znc.in]
mgl has quit [Ping timeout: 252 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
Guest71 has joined #commonlisp
pve has joined #commonlisp
psilord has quit [Ping timeout: 252 seconds]
user2 has joined #commonlisp
Th30n has joined #commonlisp
user2 has quit [Quit: WeeChat 4.4.1]
akoana has quit [Quit: leaving]
wobbol has quit [Ping timeout: 272 seconds]
Mmryss has joined #commonlisp
Mmryss has quit [Client Quit]
Mmryss has joined #commonlisp
thuna`` has quit [Ping timeout: 276 seconds]
attila_lendvai has joined #commonlisp
thuna`` has joined #commonlisp
thuna`` has quit [Ping timeout: 260 seconds]
thuna`` has joined #commonlisp
alternateved has joined #commonlisp
dawids has joined #commonlisp
dawids has quit [Remote host closed the connection]
psilord has joined #commonlisp
wobbol has joined #commonlisp
cercopith has joined #commonlisp
szkl has joined #commonlisp
nerap has joined #commonlisp
danse-nr3 has joined #commonlisp
thuna`` has quit [Ping timeout: 248 seconds]
King_julian has joined #commonlisp
attila_lendvai has quit [Ping timeout: 272 seconds]
amb007 has quit [Ping timeout: 272 seconds]
amb007 has joined #commonlisp
bobcave has joined #commonlisp
bobcave has quit [Changing host]
bobcave has joined #commonlisp
dustinm` has quit [Quit: Leaving]
JuanDaugherty has joined #commonlisp
dustinm` has joined #commonlisp
phantomics has quit [Ping timeout: 258 seconds]
phantomics has joined #commonlisp
varjag has joined #commonlisp
malaclyps has quit [Ping timeout: 248 seconds]
ezakimak has quit [Quit: No Ping reply in 180 seconds.]
ezakimak has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
mala has joined #commonlisp
amb007 has joined #commonlisp
mandw has quit [Read error: Connection reset by peer]
mandw has joined #commonlisp
jason_mw has joined #commonlisp
mandw has quit [Read error: Connection reset by peer]
Mmryss has quit [Remote host closed the connection]
JuanDaugherty has quit [Quit: JuanDaugherty]
wacki has quit [Ping timeout: 252 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
aadcg has joined #commonlisp
dans23329 has joined #commonlisp
wacki has joined #commonlisp
danse-nr3 has quit [Ping timeout: 252 seconds]
X-Scale has joined #commonlisp
green_ has joined #commonlisp
random-nick has joined #commonlisp
jfloren has quit [Server closed connection]
jfloren5 is now known as jfloren
jfloren_ has joined #commonlisp
thuna` has joined #commonlisp
zoravur has joined #commonlisp
King_julian has quit [Ping timeout: 272 seconds]
Guest71 has quit [Quit: Client closed]
McParen has joined #commonlisp
micro has quit [Server closed connection]
micro has joined #commonlisp
King_julian has joined #commonlisp
dans23329 has quit [Quit: lunch]
<zoravur> can someone explain https://plaster.tymoon.eu/view/4569#4569
<zoravur> or point me to a resource
X-Scale has quit [Ping timeout: 256 seconds]
<pranav> zoravur: Would you like to ask a question about the repl session that helps us understand where you're struggling exactly?
<zoravur> The closest comparison I can draw is lvalues and rvalues in assignment in the case of `setf`, and references in the case of `pop`
awlygj has joined #commonlisp
<mrcom> zoravur: Perhaps it would help you get your head around it if you drew the CONS boxes with the arrows pointing to "1", "2", etc.
<mrcom> (I'm assuming you've seen the CONS cell boxes thing.)
<zoravur> Yes, why is it that when I (defvar a '(1 2 3)) and assign (cdr a) to a variable b, is it that when I pop b the original list remains unchanged. I have seen the cons cell boxes thing yes, it's similar to a linked list?
<pranav> zoravur: https://novaspec.org/cl/f_pop See the notes at the end of the page which describe the behaviour of POP in terms of SETF.
<ixelp> pop | Common Lisp Nova Spec
<aeth> a -> [1 | -]-> [2 | -]-> [3 | \]
<aeth> Now what is b doing?
<pranav> zoravur: POP modifies a place; `(cdr a)` names a place within the structure of the list in `a`, whereas `b` names a place that is not part of the list in `a`.
<zoravur> It seems like `pop` is updating a reference to the value b instead of b itself, and creating a new variable creates a new reference to (cdr a)
<zoravur> so you get b -> [2 | -]-> [3 | \]
<pranav> Both the places named by `(cdr a)` and `b` get modified by POP, but only in the former case does it mean modifying the list `a`.
<zoravur> is pop a macro?
<zoravur> google tells me yes
<pranav> Yes
<pranav> The Hyperspec would tell you that as well.
<paulapatience> You can also expand pop to see what it is doing.
shawnw has joined #commonlisp
<zoravur> okay I am trying to read this (prog1 (car place) (setf place (cdr place))) in novaspec but it is confusing me. How does the expand thing work? I tried `(macroexpand-1 (pop b))` but it's just running the function
<pranav> zoravur: Are you using SLIME or SLY? Both have interactive ways to expand macros.
shawnw has quit [Ping timeout: 252 seconds]
<zoravur> I am using sbcl
<zoravur> !?
<pranav> Are you using the raw sbcl repl from the terminal?
<zoravur> just with `rlwrap`
<zoravur> but that's for command history so nothing to do with expansion
<pranav> Anyway, you'd wanna use (macroexpand-1 '(pop b))
<zoravur> ah I thought macroexpand-1 was itself a macro, but it's just a function. ironic
Guest71 has joined #commonlisp
<zoravur> okay this is hurting my brain. Point though is pop has different behaviour with (pop (cdr _)) and (pop _). So that means that I shouldn't necessarily expect them to be the same
<pranav> You shouldn't expect (cdr a) and b (right after (setf b (cdr a))) to name the same places, even though they may evaluate to the same value.
danse-nr3 has joined #commonlisp
luis has quit [Server closed connection]
luis has joined #commonlisp
jonatack has quit [Ping timeout: 244 seconds]
jmiven has quit [Quit: bye]
jmiven has joined #commonlisp
edgar-rft_ has joined #commonlisp
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
edgar-rft has quit [Ping timeout: 258 seconds]
green_ has quit [Ping timeout: 260 seconds]
danse-nr3 has quit [Quit: nap]
decweb has joined #commonlisp
rtypo has joined #commonlisp
Akbar-Birbal has left #commonlisp [Disconnected: Replaced by new connection]
Akbar-Birbal has joined #commonlisp
<younder> Seems a functional style of consing would hurt your brain less. That (setf b (cdr a)) seems questionable to me
lucasta has joined #commonlisp
<beach> zoravur: You are also modifying literal data, which is undefined behavior.
<beach> zoravur: And you are using variables A and B without first defining them.
<beach> zoravur: That too is undefined behavior.
<beach> zoravur: Like people said, (POP (CDR A)) means roughly (SETF (CDR A) (CDR (CDR A))) so it modifies the list structure of the list that is the initial value of A, and (POP B) means (SETF B (CDR B)), so it modifies the value of the variable B, but not the list that is its value.
<beach> zoravur: If you want to do things right, do (DEFPARAMETER A (LIST 1 2 3)) instead of (SETF A '(1 2 3))
<beach> zoravur: And even better, use earmuffs on special variables, so (DEFPARAMETER *A* (LIST 1 2 3)).
<beach> zoravur: I also recommend you join #clschool for questions like this. People hang out there specifically to answer newbie questions like this one.
<beach> zoravur: This page: http://metamodular.com/Common-Lisp/Tutorial/semantics.html explains Common Lisp semantics, but it doesn't have your precise example on it.
<ixelp> Common Lisp semantics
<beach> zoravur: POP has to be a macro. If it were a function, (POP B) would not be able to modify the value of B. The semantics of functions require the arguments to be evaluated before the function is applied, so if POP were a function, it would receive the value of B but it would know nothing about where that value came from, so it could not modify value of B.
<beach> zoravur: But again, these are elementary questions, better suited for #clschool.
<zoravur> Sorry, i didn't know there was a separate channel for noob question. I will shift my questions there
<beach> Great!
<McParen> beach: (pop b) can modify b is b is a clos object, for example. that restriction is only for lists.
<beach> Not so.
<beach> It can modify the object that is the value of B, but it can not give B a different value. That is, if POP were a function.
<McParen> okay.
<beach> McParen: And there is no distinction between lists and other objects.
<beach> McParen: If the value of B were a list, then a function that receives that list as a value can definitely modify the list.
<beach> ,(defun f (x) (pop (cdr x))) ,(defparameter *a* (list 1 2 3)) ,(f *a*) ,*a*
<ixelp> (defun f (x) (pop (cdr x))) => F and (defparameter *a* (list 1 2 3)) => *A* finally (f *a*) => 2
<beach> *sight*
<beach> *sigh*
<McParen> okay, but the disctinction between "value of B" and "value of the object that is the value of B" is very small, hard to understand.
<beach> ,(defun f (x) (pop (cdr x))) ,(defparameter *a* (list 1 2 3)) ,(f *a*) ,(values *a*)
<ixelp> (defun f (x) (pop (cdr x))) => F and (defparameter *a* (list 1 2 3)) => *A* and (f *a*) => 2 finally (values *a*) => (1 3)
<beach> McParen: The distinction is huge, but it is hard to explain in words, yes.
<McParen> it took me quite a long time to understand that you can modify stuff with function calls, but only certain stuff, not everything.
<beach> I don't think that's a good way of describing it. But I see what you mean.
Akbar-Birbal has left #commonlisp [Disconnected: Replaced by new connection]
<McParen> and finding out what you can modify and what you cant is basically trial and error since i've nowhere seen it explained.
Akbar-Birbal has joined #commonlisp
<beach> I am sorry to hear that that's how you see it. What you can modify is perfectly clear according to the semantics, which I refer to as "uniform reference semantics".
<pranav> McParen: See Hyperspec 5.1.2 Kinds of Places
<ixelp> 5.1 Generalized Reference | Common Lisp Nova Spec
aadcg has quit [Remote host closed the connection]
chiselfuse has quit [Ping timeout: 260 seconds]
chiselfuse has joined #commonlisp
<McParen> that was my undestanding (or lack thereof) until i found it out, but it was not starightforward finding it out.
<beach> Yes, I totally agree.
<McParen> in other languages you have by-value, by-ref, and thats it, pretty clear. in lisp, the distinction was not that intuitive.
<beach> Because in Common Lisp there is only call-by-value and semantically speaking, every value is a reference.
<beach> ... call-by-value for functions I mean.
aadcg has joined #commonlisp
<beach> If you understand that, then everything is not only clear, but way simpler than what something like C++ does.
Colleen has quit [Server closed connection]
Colleen has joined #commonlisp
Guest71 has quit [Quit: Client closed]
<random-nick> I think the confusion here comes down to "value of a variable" being used to refer both to the binding and the object it is bound to
<beach> random-nick: I think you are right.
zoravur has quit [Quit: Ping timeout (120 seconds)]
uhuh has joined #commonlisp
skeemer has joined #commonlisp
rogersm has joined #commonlisp
jonatack has joined #commonlisp
Th30n has quit [Ping timeout: 248 seconds]
McParen has left #commonlisp [#commonlisp]
amb007 has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
danse-nr3 has joined #commonlisp
jonatack has quit [Ping timeout: 255 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
zoravur has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
occ has quit [Ping timeout: 272 seconds]
contrapunctus has joined #commonlisp
King_julian has quit [Ping timeout: 272 seconds]
JuanDaugherty has joined #commonlisp
NotThatRPG has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
jonatack has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
jonatack has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shawnw has joined #commonlisp
danse-nr3 has quit [Ping timeout: 276 seconds]
zxcvz has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
shawnw has quit [Ping timeout: 260 seconds]
Perflosopher has quit [*.net *.split]
remexre has quit [*.net *.split]
easye has quit [*.net *.split]
crumbles has quit [*.net *.split]
viaken has quit [*.net *.split]
runxiyu has quit [*.net *.split]
manwithluck has quit [*.net *.split]
SAL9000 has quit [*.net *.split]
remexre has joined #commonlisp
runxiyu has joined #commonlisp
viaken has joined #commonlisp
crumbles has joined #commonlisp
SAL9000 has joined #commonlisp
easye has joined #commonlisp
Perflosopher has joined #commonlisp
manwithluck has joined #commonlisp
NotThatRPG has joined #commonlisp
skeemer has quit [Ping timeout: 265 seconds]
nerap has quit [Ping timeout: 252 seconds]
ec_ has joined #commonlisp
mgl has joined #commonlisp
emaczen has quit [Ping timeout: 248 seconds]
ec has quit [Ping timeout: 260 seconds]
thuna` has quit [Read error: Connection reset by peer]
waleee has joined #commonlisp
alcor has joined #commonlisp
zoravur has quit [Quit: Client closed]
bobcave has quit [Quit: Leaving]
JuanDaugherty has quit [Quit: JuanDaugherty]
yitzi has joined #commonlisp
uhuh has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
cercopith has quit [Quit: Leaving]
cage has quit [Quit: rcirc on GNU Emacs 29.4]
Akbar-Birbal has left #commonlisp [Disconnected: Replaced by new connection]
Akbar-Birbal has joined #commonlisp
lucasta has quit [Remote host closed the connection]
danse-nr3 has joined #commonlisp
JuanDaugherty has joined #commonlisp
X-Scale has joined #commonlisp
mgl has quit [Ping timeout: 244 seconds]
Posterdati has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
Posterdati has joined #commonlisp
terrorjack4 has quit [Quit: The Lounge - https://thelounge.chat]
Posterdati has quit [Client Quit]
terrorjack4 has joined #commonlisp
Posterdati has joined #commonlisp
mgl has joined #commonlisp
rogersm has quit [Quit: Leaving...]
X-Scale has quit [Ping timeout: 256 seconds]
amb007 has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
theBlackDragon has quit [Ping timeout: 260 seconds]
danse-nr3 has quit []
theBlackDragon has joined #commonlisp
mgl has quit [Ping timeout: 244 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
JuanDaugherty has quit [Quit: JuanDaugherty]
mgl has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
eddof13 has joined #commonlisp
eddof13 has quit [Ping timeout: 244 seconds]
GreaseMonkey has quit [Ping timeout: 252 seconds]
Akbar-Birbal has left #commonlisp [#commonlisp]
mgl_ has joined #commonlisp
mgl has quit [Ping timeout: 244 seconds]
dlowe has quit [Remote host closed the connection]
dlowe has joined #commonlisp
Pixel_Outlaw has joined #commonlisp
greaser|q has joined #commonlisp
acidbong has left #commonlisp [#commonlisp]
jonatack has quit [Ping timeout: 245 seconds]
jonatack has joined #commonlisp
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
skeemer has joined #commonlisp
awlygj has quit [Quit: leaving]
yitzi has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
yitzi has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jon_atack has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
mrcom is now known as the-woodwork
jonatack has quit [Read error: Connection reset by peer]
the-woodwork is now known as mrcom
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Read error: Connection reset by peer]
NotThatRPG has joined #commonlisp
ym has joined #commonlisp
mwnaylor has joined #commonlisp
edgar-rft_ is now known as edgar-rft
ym has quit [Ping timeout: 252 seconds]
King_julian has joined #commonlisp
<prokhor> urgent question: how do i access files in a vm in a backup file? the template has become obsoloete so i can not restore it :(
<bike> er, is this a lisp question?
greaser|q has quit [Changing host]
greaser|q has joined #commonlisp
greaser|q is now known as GreaseMonkey
pve has quit [Quit: leaving]
<aeth> From a low level point of view, you could view everything in CL as references (but you can't access the pointers or reference locations directly) to objects on the heap except when it can be small enough to be optimized (e.g. fixnums... and this is why you can't access it directly! is a single-float on the heap or not? in 32-bit probably, in 64-bit probably not) or when you request otherwise (declaring
<aeth> dynamic-extent, but most declares, including that one, are requests that can be denied).
mgl_ has quit [Ping timeout: 252 seconds]
<aeth> Or, rather, small and immutable. Fixnums are both. Single-float may or may not be small enough.
akovalenko has quit [Read error: Connection reset by peer]
akovalenko has joined #commonlisp
King_julian has quit [Ping timeout: 272 seconds]
King_julian has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NotThatRPG has joined #commonlisp
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yitzi has quit [Remote host closed the connection]
xlymian has quit [Ping timeout: 276 seconds]
King_julian has quit [Ping timeout: 244 seconds]
xlymian has joined #commonlisp
skeemer has quit [Ping timeout: 252 seconds]
spdegabrielle has joined #commonlisp
xlymian has quit [Read error: Connection reset by peer]
shawnw has joined #commonlisp
alternateved has quit [Remote host closed the connection]
shka has quit [Ping timeout: 248 seconds]
zoravur has joined #commonlisp
zoravur has quit [Client Quit]
char has joined #commonlisp
JuanDaugherty has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
ec_ has quit [Remote host closed the connection]
ec has joined #commonlisp
JuanDaugherty has quit [Ping timeout: 252 seconds]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
occ has joined #commonlisp