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))
<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.
<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>
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]