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/>
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 264 seconds]
Lord_of_Life_ is now known as Lord_of_Life
elevenkb has quit [Ping timeout: 276 seconds]
kevingal_ has quit [Ping timeout: 250 seconds]
kevingal has quit [Ping timeout: 250 seconds]
waleee has quit [Ping timeout: 248 seconds]
waleee has joined #commonlisp
pfd has quit [Ping timeout: 260 seconds]
sjl has quit [Quit: WeeChat 3.6]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
perrierjouet has quit [Ping timeout: 248 seconds]
sjl has joined #commonlisp
skin has quit [Ping timeout: 246 seconds]
jonatack has quit [Quit: WeeChat 3.8]
skin has joined #commonlisp
jonatack has joined #commonlisp
akoana_ has quit [Quit: leaving]
akoana has quit [Quit: leaving]
bitmapper has quit [Quit: Connection closed for inactivity]
eddof13 has joined #commonlisp
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
waleee has quit [Ping timeout: 248 seconds]
eddof13 has joined #commonlisp
waleee has joined #commonlisp
nij- has joined #commonlisp
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
waleee has quit [Ping timeout: 260 seconds]
Oladon has joined #commonlisp
nij- has quit [Ping timeout: 248 seconds]
NotThatRPG has joined #commonlisp
luis has quit [Quit: Ping timeout (120 seconds)]
luis has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
chrcav has quit [Ping timeout: 240 seconds]
chrcav has joined #commonlisp
skin1 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
mariari has quit [Ping timeout: 246 seconds]
mariari has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skin has quit [Ping timeout: 240 seconds]
skin has joined #commonlisp
skin1 has quit [Quit: Leaving.]
NicknameJohn has quit [Ping timeout: 255 seconds]
NicknameJohn has joined #commonlisp
notzmv has joined #commonlisp
skin has quit [Ping timeout: 246 seconds]
skin has joined #commonlisp
dcb has quit [Quit: MSN Messenger v2.16.1]
NicknameJohn has quit [Ping timeout: 240 seconds]
skin1 has joined #commonlisp
notzmv has quit [Read error: Connection reset by peer]
NicknameJohn has joined #commonlisp
semarie has quit [Remote host closed the connection]
semarie has joined #commonlisp
notzmv has joined #commonlisp
Oladon has quit [Quit: Leaving.]
skin1 has quit [Read error: Connection reset by peer]
pjb is now known as Guest7805
skin1 has joined #commonlisp
pfd has joined #commonlisp
Guest7805 has quit [Ping timeout: 248 seconds]
pjb has joined #commonlisp
Alfr has quit [Killed (copper.libera.chat (Nickname regained by services))]
Spec` has joined #commonlisp
Alfr has joined #commonlisp
luis0 has joined #commonlisp
luis has quit [Quit: Ping timeout (120 seconds)]
luis0 is now known as luis
spec has quit [Quit: ZNC - http://znc.in]
skin1 has quit [Read error: Connection reset by peer]
pfd has quit [Quit: Client closed]
slyrus has joined #commonlisp
soundmodel has joined #commonlisp
soundmodel has quit [Client Quit]
euandreh has quit [Remote host closed the connection]
euandreh has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
bird_ has quit [Ping timeout: 265 seconds]
euandreh has quit [Ping timeout: 255 seconds]
rgherdt has joined #commonlisp
soundmodel has joined #commonlisp
cdegroot has quit [Ping timeout: 276 seconds]
beach has joined #commonlisp
<beach> cpli: It is not the symbols that are made available. They are handled by READ. Traditionally, a symbol has a slot of the global function definition, and a slot for the global symbol value, but that doesn't necessarily work very well in the presence of threads. In SICL functions like FDEFINITION trampoline to a first-class global environment where the definition is stored.
beach` has joined #commonlisp
shka has joined #commonlisp
beach` has quit [Remote host closed the connection]
beach has quit [Ping timeout: 260 seconds]
Cymew has joined #commonlisp
kenran has joined #commonlisp
MajorBiscuit has joined #commonlisp
makomo has joined #commonlisp
MajorBiscuit has quit [Quit: WeeChat 3.6]
scymtym has quit [Remote host closed the connection]
Brucio-61 has quit [Ping timeout: 260 seconds]
MajorBiscuit has joined #commonlisp
LW has joined #commonlisp
Brucio-61 has joined #commonlisp
msavoritias_ has joined #commonlisp
msavoritias_ has quit [Remote host closed the connection]
varjag has joined #commonlisp
NicknameJohn has quit [Ping timeout: 255 seconds]
Krystof has joined #commonlisp
attila_lendvai has joined #commonlisp
azimut has joined #commonlisp
notzmv has quit [Ping timeout: 252 seconds]
mgl has joined #commonlisp
Spec` is now known as spec
Brucio-61 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
easye has quit [Ping timeout: 246 seconds]
easye has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
soundmodel has quit [Ping timeout: 260 seconds]
scymtym has joined #commonlisp
Brucio-61 has joined #commonlisp
remexre_ has joined #commonlisp
remexre has quit [Read error: Connection reset by peer]
remexre_ is now known as remexre
soundmodel has joined #commonlisp
soundmodel has quit [Ping timeout: 260 seconds]
pve has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
artemon has quit [Quit: You have been kicked for being idle]
mgl has quit [*.net *.split]
triffid has quit [*.net *.split]
anticomputer has quit [*.net *.split]
gxt__ has quit [*.net *.split]
<cpli> beach, by "handled by READ" you mean READ calls INTERN.
<cpli> rather, do you?
<cpli> i would've assumed it would go READ INTERN SET-SYMBOL-VALUE?
notzmv has joined #commonlisp
jmdaemon has quit [Ping timeout: 252 seconds]
cdegroot has joined #commonlisp
<phoe> cpli: READ calls INTERN, then READ returns
<phoe> it is the role of the evaluator/compiler to set symbol values
<phoe> and for this the reading stage must be completed, the reader must finish
NicknameJohn has joined #commonlisp
<cpli> phoe, yes. READ would not e**valu**ate
<phoe> so it's READ INTERN and then SETF SYMBOL-VALUE afterwards
<phoe> might be what you meant, I might have misread it
<Equill> Yay, the overhaul looks like it's done! Now to write a quick'n'dirty hack to export data from the current system, so I can import it into the new one. Hey look, there's the library I wound up writing *last* time I tried a quick'n'dirty hack... :facepalm:
<Equill> I was reminded by this line in the README: "I tried and failed to write a dirty hack, so now I have a library." Is it just my take on things, or does CL just guide you away from dirty hacks, by its nature?
karlosz has joined #commonlisp
karlosz has quit [Quit: karlosz]
random-nick has joined #commonlisp
Krystof has quit [Ping timeout: 240 seconds]
tyson2 has joined #commonlisp
euandreh has joined #commonlisp
NotThatRPG has joined #commonlisp
euandreh has quit [Remote host closed the connection]
pranavats has left #commonlisp [Error from remote client]
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
makomo has quit [Ping timeout: 255 seconds]
<ogamita> cpli: compare the results, when you type at the REPL: (find-symbol "FOO123") RET (quote (defparameter foo123 42)) RET (values (find-symbol "FOO123") (boundp 'foo123)) RET (defparameter foo 42) RET (values (find-symbol "FOO123") (boundp 'foo123)) RET
<ogamita> s/foo/foo123/ or some other unique and never used before name.
<ogamita> oops, I meant (find-symbol "FOO123") RET and then if found, (boundp 'foo123) RET
<ogamita> (values (find-symbol "FOO123") (when (find-symbol "FOO123") (boundp (find-symbol "FOO123")))) if you want.
<ogamita> cpli: then you can also put the defparameter in a file (with a new symbol name), and check it after (compile-file "foo.lisp") before (load "foo.fasl") and after.
<ogamita> cpli: compiling a file doesn't necessarily mutate the run environment.
makomo has joined #commonlisp
euandreh has joined #commonlisp
anticomputer has joined #commonlisp
euandreh has quit [Remote host closed the connection]
zacque has joined #commonlisp
euandreh has joined #commonlisp
gxt__ has joined #commonlisp
piethesailor has joined #commonlisp
markb1 has joined #commonlisp
skin has quit [Ping timeout: 276 seconds]
skin has joined #commonlisp
triffid has joined #commonlisp
phantomics has quit [Ping timeout: 240 seconds]
kenran has quit [Remote host closed the connection]
kevingal has joined #commonlisp
kevingal_ has joined #commonlisp
jeosol has joined #commonlisp
waleee has joined #commonlisp
edgar-rft has quit [Quit: Leaving]
LW has quit [Quit: WeeChat 3.8]
zxcvz has joined #commonlisp
rogersm has joined #commonlisp
pranavats has joined #commonlisp
zacque has quit [Quit: Goodbye :D]
phantomics has joined #commonlisp
pfd has joined #commonlisp
lucasta has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
bird_ has joined #commonlisp
rgherdt has quit [Ping timeout: 250 seconds]
luna-is-here has quit [Quit: luna-is-here]
MajorBiscuit has quit [Ping timeout: 250 seconds]
msavoritias_ has joined #commonlisp
Cymew has quit [Ping timeout: 255 seconds]
Gleefre has joined #commonlisp
waleee has quit [Quit: WeeChat 3.8]
cmack has quit [Ping timeout: 276 seconds]
rgherdt has joined #commonlisp
edgar-rft has joined #commonlisp
_cymew_ has joined #commonlisp
masinter has joined #commonlisp
rgherdt has quit [Ping timeout: 252 seconds]
NotThatRPG has quit [Ping timeout: 276 seconds]
tyson2 has quit [Remote host closed the connection]
mason has joined #commonlisp
dcb has joined #commonlisp
cage has joined #commonlisp
luna-is-here has joined #commonlisp
_cymew_ has quit [Ping timeout: 240 seconds]
MajorBiscuit has joined #commonlisp
msavoritias_ has quit [Remote host closed the connection]
piethesailor has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
piethesailor has joined #commonlisp
piethesailor has left #commonlisp [#commonlisp]
msavoritias_ has joined #commonlisp
msavoritias_ has quit [Remote host closed the connection]
msavoritias_ has joined #commonlisp
tyson2 has joined #commonlisp
triffid has quit [Remote host closed the connection]
tyson2` has joined #commonlisp
alejandrozf has left #commonlisp [ERC (IRC client for Emacs 27.1)]
NotThatRPG has joined #commonlisp
atuin has joined #commonlisp
<atuin> hi
waleee has joined #commonlisp
morganw has joined #commonlisp
jmdaemon has joined #commonlisp
<cpli> ogamita, so does read not intern symbols, eval does?
<cpli> take: '(DEFPARAMETER LMAO 42). that should quote 'LMAO but it's not considered bound after (QUOTE (DEFPARAMETER LMAO 42))
Noisytoot has quit [Quit: ZNC 1.8.2 - https://znc.in]
Noisytoot has joined #commonlisp
msavoritias_ has quit [Ping timeout: 250 seconds]
<Alfr> cpli, no. Read interns symbols, see clhs 2.3.4 .
attila_lendvai has quit [Ping timeout: 255 seconds]
<Bike> cpli: interning symbols and assigning values to them are totally different processes. usually, the reader interns symbols, and values are assigned during evaluation of read forms.
<Bike> cpli: all interning does is putting the symbol into a package so that subsequent reads return the same symbol. it has nothing to do with any value the symbol does or does not have.
tyson2`` has joined #commonlisp
tyson2` has quit [Ping timeout: 252 seconds]
tyson2`` has quit [Remote host closed the connection]
tyson2 has quit [Ping timeout: 250 seconds]
<kevingal_> cpli: 'LMAO isn't bound because you quoted the call to DEFPARAMETER, but if you do (find-symbol "LMAO") you will find that the symbol has been created.
atuin has quit [Remote host closed the connection]
cage has quit [Quit: rcirc on GNU Emacs 28.2]
<cpli> kevingal: ah, thank you. true.
lucasta has quit [Remote host closed the connection]
<pjb> cpli: yes, it's READ that calls INTERN.
<pjb> cpli: reading a quoted expression in the REPL disable the E, to make it a RPL.
<pjb> cpli: so you can test the effect of just reading the expression.
<pjb> cpli: alternatively, you can do it in two steps: eval at the REPL: (read) RET then enter the sexp you want to read, eg (defparameter *foo532* 42) RET.
<pjb> (read) will return the read sexp, the REPL will print it and loop, and it won't have been evaluated.
<pjb> Then you can inspect the image with: (find-symbol "*FOO532*") and (when (find-symbol "*FOO532*") (boundp (find-symbol "*FOO532*") ))
<pjb> possibly you could bind this read expression to a variable: (defparameter *form* (read)) , then you will be able to (eval *form*) and inspect again the image.
<pjb> This shows that the symbol that names the variable is interned when the form is read, but the variable is created and bound only when the form is evaluated.
<pjb> cpli: now, packages are just the "dictionaries" where symbols are interned (in current package, bound to *package* by default). Plus some non-essential gymnastic with package uses, imports, exports, etc.
<pjb> You can intern symbols in packages (and export them, use the package to make the exported symbols visible in other packages etc, without evaluating any form that would bind those symbols to variables, functions, types or anything.
<pjb> Of course, the point of having access to a symbol is to have access to its value, function, designated type or other, so once you've read them and interned them, it's useful to execute the code that will "define" them, ie. create those bindings. That's why you load files after compiling them: (load (compile-file "foo.lisp")) ; this is done automatically by asdf and other system construction systems.
<pjb> cpli: this is important to understand this distinction, because you can use packages and symbols at run-time, without associating them with lisp definitions, just for your own user data representation needs.
<cpli> pjb if i were.. (just hypothetically) trying to implement a lisp of my own, and trying to bootstrap it off of sbcl with codegen to qbe/cranelift i don't think lexical bindings ought to be just some dictionary. where does lisp determine whether something is dynamic/special or lexical
<pjb> cpli: special operators (and macros) decide that.
<pjb> cpli: ie. PROGV binds dynamic variables. (defun f () (declare (special a)) a) (progv '(a) '(42) (f)) #| --> 42 |#
lucasta has joined #commonlisp
<Bike> a symbol can be special and not special in different lexical contexts. in (let ((x 7)) (declare (special x)) (+ x (let ((x 8)) x))) the inner x is lexical and the outer is special.
<pjb> cpli: eg. LET (and LET*) bind lexical variables, unless the symbol naming them is declared special, in which case they bind them dynamically. (let ((a 42)) (declare (special a)) (f)) #| --> 42 |#
<pjb> (let ((a 42)) (f)) #| ERROR: Unbound variable: a |#
<pjb> cpli: note however that there's no way to remove a global special declaration, made with proclaim, declaim, or indirectly with defvar and defparameter, hence the *foo* convention: to avoid that a (let (foo) …) made a dynamic binding when it wanted a lexical binding.
lucasta has quit [Remote host closed the connection]
<cpli> pjb dynamic variables are incredibly elegant to thread safely call a procedure with a different global value
<cpli> and i wouldn't know if its appropriate for me to ask in #commonlisp
<cpli> but are there approaches to binding and interning found in other lisps that are elegant/cute/convenient?
<Bike> you could look up haskell parameters or scheme fluids, but they're pretty similar.
<cpli> Bike I know Haskell a whole load better than I do common lisp
<cpli> and i have never heard of "Haskell parameters"
<cpli> Bike what is a dynamic root for fluids?
rgherdt has joined #commonlisp
ymir has joined #commonlisp
ymir has quit [Remote host closed the connection]
shka has quit [Ping timeout: 248 seconds]
pfd has quit [Ping timeout: 245 seconds]
morganw has quit [Remote host closed the connection]
makomo has quit [Ping timeout: 276 seconds]
pve has quit [Quit: leaving]
NotThatRPG has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Ping timeout: 240 seconds]
Gleefre has quit [Ping timeout: 245 seconds]
karlosz has joined #commonlisp
kevingal_ has quit [Ping timeout: 240 seconds]
kevingal has quit [Ping timeout: 240 seconds]
lucasta has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
<ixelp> 6.11.5. Implicit parameters — Glasgow Haskell Compiler 9.7.20230425 User's Guide
<Bike> i don't know what a "dynamic root for fluids" is either
waleee has quit [Ping timeout: 260 seconds]
<hayley> See Scheme parameters as well.
rtoy has joined #commonlisp
waleee has joined #commonlisp
<cpli> Bike are there implementations for implicit optional argument propagation in CL?
<Bike> i mean that's what dynamic variable are, kinda.
<cpli> i.e. imp params
<Bike> obviously we don't need the type stuff haskell does.
<cpli> can't find good resources on scheme's fluids and parameters
<ixelp> SRFI 39: Parameter objects
tyson2 has joined #commonlisp
waleee has quit [Ping timeout: 250 seconds]
waleee has joined #commonlisp
karlosz has quit [Quit: karlosz]
Gleefre has joined #commonlisp
perrierjouet has joined #commonlisp
chrcav has quit [Ping timeout: 240 seconds]
chrcav has joined #commonlisp