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/>
germ has quit [Changing host]
germ has joined #commonlisp
tyson2 has joined #commonlisp
dra has joined #commonlisp
decweb has quit [Ping timeout: 255 seconds]
nij- has quit [Ping timeout: 272 seconds]
nij- has joined #commonlisp
ymir has joined #commonlisp
awlygj has joined #commonlisp
nani has quit [Remote host closed the connection]
nani has joined #commonlisp
dra has quit [Remote host closed the connection]
dnhester` has quit [Ping timeout: 272 seconds]
reb has joined #commonlisp
kevingal has quit [Remote host closed the connection]
rgherdt has quit [Remote host closed the connection]
zaymington has quit [Ping timeout: 255 seconds]
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
m5zs7k has quit [Remote host closed the connection]
dnhester` has joined #commonlisp
jmdaemon has quit [Ping timeout: 260 seconds]
m5zs7k has joined #commonlisp
ymir has quit [Ping timeout: 252 seconds]
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
ymir has joined #commonlisp
pranavats has joined #commonlisp
dnhester` has quit [Ping timeout: 252 seconds]
jmdaemon has joined #commonlisp
eddof13 has joined #commonlisp
dnhester` has joined #commonlisp
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
random-nick has quit [Ping timeout: 256 seconds]
ymir1 has joined #commonlisp
ymir has quit [Read error: Connection reset by peer]
ymir1 has quit [Remote host closed the connection]
ymir has joined #commonlisp
dnhester` has quit [Ping timeout: 256 seconds]
ymir has quit [Ping timeout: 252 seconds]
rendar has quit [Ping timeout: 264 seconds]
ymir has joined #commonlisp
ymir has quit [Remote host closed the connection]
ymir has joined #commonlisp
decweb has joined #commonlisp
dnhester` has joined #commonlisp
dnhester` has quit [Ping timeout: 264 seconds]
nij- has quit [Ping timeout: 255 seconds]
jmdaemon has quit [Ping timeout: 255 seconds]
Lord_of_Life has quit [Ping timeout: 260 seconds]
pranavats has left #commonlisp [Disconnected: Hibernating too long]
Lord_of_Life has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
tyson2` has joined #commonlisp
istewart has joined #commonlisp
igemnace has joined #commonlisp
dnhester` has joined #commonlisp
tyson2 has quit [Ping timeout: 240 seconds]
decweb has quit [Ping timeout: 255 seconds]
dnhester` has quit [Ping timeout: 272 seconds]
ymir has quit [Remote host closed the connection]
ymir has joined #commonlisp
attila_lendvai has quit [Ping timeout: 255 seconds]
dnhester` has joined #commonlisp
dnhester` has quit [Ping timeout: 246 seconds]
igemnace has quit [Read error: Connection reset by peer]
dnhester` has joined #commonlisp
dnhester` has quit [Ping timeout: 260 seconds]
igemnace has joined #commonlisp
semz has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
semz has joined #commonlisp
josrr has quit [Remote host closed the connection]
germ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
ebrasca` has quit [Remote host closed the connection]
ebrasca has quit [Remote host closed the connection]
tyson2`` has joined #commonlisp
tyson2` has quit [Ping timeout: 252 seconds]
ymir has quit [Ping timeout: 264 seconds]
pranavats has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
eddof13 has joined #commonlisp
tyson2`` has quit [Read error: Connection reset by peer]
germ has joined #commonlisp
germ has quit [Client Quit]
germ has joined #commonlisp
germ has quit [Changing host]
germ has joined #commonlisp
ymir has joined #commonlisp
germ has quit [Client Quit]
germ has joined #commonlisp
germ has quit [Changing host]
germ has joined #commonlisp
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
nij- has joined #commonlisp
<nij-> Hi! Is there any working common lisp implementation (hopefully SBCL) that allows me to interact with the hosting lang/machine through a repl?
<nij-> For example, if a CL is implemented in python, I'd like to work with the internal in the python repl.
<Mondenkind> sbcl is hosted in common lisp, and allows you to interact with common lisp through your common lisp repl
<beach> nij-: How would you interact with the hosting x86 machine?
<Mondenkind> well, you can write assembly in sbcl and ccl at least
mzan has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<beach> nij-: About first-class global environments, there have been several proposals in the past, mainly for Scheme, but they require each lookup to be a hash-table lookup, which is unacceptable for a function call. To be practical, first-class global environments would have to be fast, and someone had to invent that.
mzan has joined #commonlisp
brokkoli_origin has quit [Ping timeout: 268 seconds]
brokkoli_origin has joined #commonlisp
<beach> nij-: Maybe you are under the impression that a Common Lisp implementation like SBCL is implemented on top of some other language or some Common Lisp implementation, and that that language/implementation is still present in the final system?
decweb has joined #commonlisp
ymir has quit [Ping timeout: 272 seconds]
<aeth> nij-: the only such Common Lisps that I'm aware of are ABCL (JVM, though, and not Java) and JSCL (JS, but also not a complete implementation of CL; WASM is probably a better approach to CL in the browser)
<aeth> "Lisps" implemented in Python, Lua, etc., tend to be "toy Lisps" (not particularly useful, featureful, or supported by many (non-foreign) libraries)
<nij-> Mondenkind Woosh! Anyway I can tap into the underlying repl?
<bike> there is no "underlying repl"
<bike> where did you get the idea there was such a thing
<aeth> the "underlying repl" of a native-compiling system would be shell, I guess? sort of?
<bike> i think nij is already making enough assumptions without your help
<nij-> aeth does ABCL and JSCL expose their underlying repl?
<nij-> bike - always no?
<Mondenkind> nij-: there is just the one repl
<bike> nij-: what?
<aeth> nij-: Java has no REPL, although there is an unofficial one called "beanshell"... Java isn't very good for that sort of thing because it's so verbose
<Mondenkind> in the case of sbcl, there is nothing underneath
<beach> nij-: I think it is important to clear up this idea of yours. What would be the "underlying REPL of something like SBCL?
<nij-> :O
<aeth> JSCL is the only one that could expose an underlying REPL and it's far too feature incomplete in implementing the core CL language for it to think about extensions
<Mondenkind> you have access to everything you might want to access from just the one repl
<nij-> Hmmm... wait....
decweb has quit [Ping timeout: 260 seconds]
<bike> nij-: i think you would learn more efficiently if you would take a moment every so often to consider how supported the honestly pretty wild assumptions you seem to make actually are
<bike> none of us have any idea what you're thinking an "underlying repl" is or would be
<bike> aeth's trying hard to guess
<beach> nij-: I agree with bike. It is a bit noisy here in #commonlisp, but we can have a long discussion in #sicl if you like on how to implement Common Lisp systems.
<aeth> bike: I think nij- thinks that every CL is like JSCL (which, again, is extremely incomplete) and has an underlying REPL to expose
<nij-> Sorry.. should I go to clschool for this?
<aeth> while in reality we have to dig deep to an obscure, incomplete CL implementation to find one that matches nij-'s expectations
<bike> i'm not really criticizing you, just saying you're not gonna get far like this
<bike> we can't answer your question if we don't understand it
<nij-> bike I understand your point.
<beach> nij-: Maybe #clschool, but perhaps #sicl if it gets too advanced.
<nij-> I thought SBCL is developed in common lisp, so during the development, there's a repl already.
<nij-> I'll go to #clschool. Thanks folks!
<aeth> Common Lisps tend to be self-hosted compilers (and e.g. the function COMPILE) is exposed at compile time. But the way compilation works is, it's usually done file-by-file. So instead of having stages a->b->c->d->... for the whole thing, you're doing stages a->b->c->d->... for each file (which means most CLs require an existing CL to bootstrap themselves)
<aeth> s/e.g. the function COMPILE/e.g. expose the function COMPILE/
<aeth> (I guess we moved to #clschool while I was typing that)
<nij-> Compilation isn't done form by form? aeth
<aeth> Simplified: Common Lisps are self-hosted compilers that tend to go file-by-file, which means that a Common Lisp usually requires an existing Common Lisp to bootstrap itself.
<aeth> Usually.
<aeth> (moving to the other channel)
ymir has joined #commonlisp
eddof13 has joined #commonlisp
dcb has quit []
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
pfdietz has quit [Ping timeout: 250 seconds]
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
istewart has quit [Quit: Konversation terminated!]
<aeth> To summarize my points in the other, unlogged channel for this one: A Common Lisp must (by the spec) go through the exposed (and customizable) stages read -> (macroexpand -> compile) -> load -> eval. Bootstrapping a Common Lisp means using one Common Lisp to compile a "FASL" that is loaded/eval'd in another.
<aeth> Technically, compiler macros then macros. And as substages of compilation.
dnhester` has joined #commonlisp
ronald_ has quit [Ping timeout: 264 seconds]
ronald has joined #commonlisp
dnhester` has quit [Ping timeout: 268 seconds]
green_ has joined #commonlisp
<aeth> my bad, EVAL-WHEN in the spec is confusing, execute is the final stage
tisanae has quit [Quit: WeeChat 4.1.2]
ymir has quit [Ping timeout: 264 seconds]
eddof13 has joined #commonlisp
ymir has joined #commonlisp
shka has joined #commonlisp
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Pixel_Outlaw has quit [Ping timeout: 260 seconds]
resttime has quit [Quit: resttime]
phantomics_ has joined #commonlisp
robin_ has joined #commonlisp
patrix_ has joined #commonlisp
jfloren8 has joined #commonlisp
mesaoptimizer has quit [Remote host closed the connection]
patrix has quit [Ping timeout: 268 seconds]
pkal has quit [Ping timeout: 268 seconds]
randm has quit [Ping timeout: 268 seconds]
patrix_ is now known as patrix
antoszka has quit [Ping timeout: 268 seconds]
robin has quit [Ping timeout: 268 seconds]
luna-is-here has quit [Ping timeout: 268 seconds]
phantomics has quit [Ping timeout: 268 seconds]
|3b| has quit [Ping timeout: 268 seconds]
kmroz has quit [Ping timeout: 268 seconds]
jfloren has quit [Ping timeout: 268 seconds]
gendl__ has quit [Ping timeout: 268 seconds]
jfloren8 is now known as jfloren
randm has joined #commonlisp
tursom has quit [Remote host closed the connection]
kmroz has joined #commonlisp
ymir has quit [Ping timeout: 268 seconds]
xantoz has quit [Ping timeout: 268 seconds]
|3b|` has joined #commonlisp
tursom has joined #commonlisp
xantoz has joined #commonlisp
iNomad has quit [Quit: leaving]
gendl__ has joined #commonlisp
amb007 has joined #commonlisp
luna-is-here has joined #commonlisp
rtypo has quit [Ping timeout: 252 seconds]
zetef has joined #commonlisp
zetef has quit [Remote host closed the connection]
zetef has joined #commonlisp
ymir has joined #commonlisp
antoszka has joined #commonlisp
pkal has joined #commonlisp
Cymew has joined #commonlisp
zetef has quit [Client Quit]
zetef has joined #commonlisp
wacki has joined #commonlisp
green_ has quit [Ping timeout: 264 seconds]
patrix has quit []
patrix has joined #commonlisp
ymir has quit [Ping timeout: 256 seconds]
King_julian has joined #commonlisp
gorignak has quit [Ping timeout: 264 seconds]
iNomad has joined #commonlisp
dnhester` has joined #commonlisp
pve has joined #commonlisp
msavoritias has joined #commonlisp
zetef has quit [Ping timeout: 264 seconds]
dnhester` has quit [Ping timeout: 246 seconds]
ymir has joined #commonlisp
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waleee has joined #commonlisp
Odin-LAP has quit [Ping timeout: 256 seconds]
occ has quit [Ping timeout: 252 seconds]
King_julian has quit [Read error: Connection reset by peer]
King_julian has joined #commonlisp
occ has joined #commonlisp
ymir has quit [Ping timeout: 255 seconds]
zaymington has joined #commonlisp
resttime has joined #commonlisp
AndreiDuma has joined #commonlisp
AndreiDuma has quit [Remote host closed the connection]
AndreiDuma_ has joined #commonlisp
danza has joined #commonlisp
younder has quit [Remote host closed the connection]
zetef has joined #commonlisp
varjag has joined #commonlisp
mgl has joined #commonlisp
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
rgherdt has joined #commonlisp
beach` has joined #commonlisp
beach has quit [Ping timeout: 255 seconds]
notzmv has quit [Ping timeout: 255 seconds]
bendersteed has joined #commonlisp
bendersteed has quit [Client Quit]
danza has quit [Read error: Connection reset by peer]
danza has joined #commonlisp
AndreiDuma_ has quit [Quit: Textual IRC Client: www.textualapp.com]
alcor has joined #commonlisp
dnhester` has joined #commonlisp
AndreiDuma has joined #commonlisp
danza has quit [Ping timeout: 268 seconds]
ronald has quit [Ping timeout: 264 seconds]
ronald has joined #commonlisp
beach` is now known as beach
kamafam has joined #commonlisp
dino_tutter has joined #commonlisp
rendar has joined #commonlisp
jonatack has quit [Ping timeout: 255 seconds]
donleo has joined #commonlisp
agrosant has joined #commonlisp
jonatack has joined #commonlisp
danse-nr3 has joined #commonlisp
agrosant has quit [Ping timeout: 264 seconds]
msavoritias has quit [Ping timeout: 246 seconds]
Oladon has quit [Read error: Connection reset by peer]
nij- has joined #commonlisp
notzmv has joined #commonlisp
msavoritias has joined #commonlisp
mesaoptimizer has joined #commonlisp
danse-nr3 has quit [Remote host closed the connection]
danse-nr3 has joined #commonlisp
agrosant has joined #commonlisp
agrosant has quit [Ping timeout: 264 seconds]
ebrasca has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
agrosant has joined #commonlisp
deadmarshal_ has quit [Ping timeout: 264 seconds]
younder has joined #commonlisp
nij- has quit [Ping timeout: 260 seconds]
Guest7 has joined #commonlisp
deadmarshal_ has joined #commonlisp
Guest7 has quit [Client Quit]
random-nick has joined #commonlisp
Odin- has quit [Ping timeout: 252 seconds]
agrosant has quit [Ping timeout: 264 seconds]
mgl has quit [Ping timeout: 268 seconds]
traidare has joined #commonlisp
traidare has quit [Quit: WeeChat 4.2.1]
traidare has joined #commonlisp
Gleefre has joined #commonlisp
dnhester` has quit [Ping timeout: 260 seconds]
cage has joined #commonlisp
prokhor__ has joined #commonlisp
chsasank3 has joined #commonlisp
Shinmera- has joined #commonlisp
agrosant has joined #commonlisp
Shinmera has quit [Ping timeout: 252 seconds]
Colleen has quit [Remote host closed the connection]
chsasank has quit [Ping timeout: 252 seconds]
prokhor_ has quit [Ping timeout: 252 seconds]
chsasank3 is now known as chsasank
Shinmera- is now known as Shinmera
Colleen has joined #commonlisp
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
King_julian has quit [Ping timeout: 240 seconds]
nani has quit [Remote host closed the connection]
nani has joined #commonlisp
attila_lendvai has joined #commonlisp
yitzi has joined #commonlisp
agrosant has quit [Ping timeout: 264 seconds]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
yitzi has quit [Remote host closed the connection]
dnhester` has joined #commonlisp
dnhester` has quit [Ping timeout: 246 seconds]
AndreiDuma has joined #commonlisp
AndreiDuma has quit [Client Quit]
agrosant has joined #commonlisp
mgl has joined #commonlisp
traidare has quit [Ping timeout: 264 seconds]
dnhester` has joined #commonlisp
dnhester` has quit [Ping timeout: 268 seconds]
Gleefre has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 256 seconds]
dnhester` has joined #commonlisp
nani has quit [Remote host closed the connection]
nani has joined #commonlisp
green_ has joined #commonlisp
dnhester` has quit [Ping timeout: 255 seconds]
zetef has quit [Remote host closed the connection]
amb007 has joined #commonlisp
nij- has joined #commonlisp
<nij-> I'm very confused by lexical bindings vs dynamic bindings.. https://bpa.st/SX3A
<ixelp> View paste SX3A
<nij-> I thought CL is lexical.. that should make CL(1) and CL(2) in the link return 3, no? But it's returning 2.
AndreiDuma has joined #commonlisp
dnhester` has joined #commonlisp
<_death> clhs defvar
<ixelp> CLHS: Macro DEFPARAMETER, DEFVAR
King_julian has joined #commonlisp
danse-nr3 has quit [Ping timeout: 264 seconds]
<nij-> !! defvar and defparameter explicitly makes the variable dynamic, therefore not lexical!?
<_death> !! yes !!
<nij-> !! Guoosh !!
traidare has joined #commonlisp
<nij-> So if I don't know X is dynamic.. what should I do in the local context to guarantee that "from then on" in the context X is lexical?
<_death> there's nothing to do in that case.. that's one good reason to decorate names of special variables with *earmuffs*
<nij-> I see.
<nij-> If X isn't defvar nor defparameter'd.. what would setf make X?
<nij-> Woah.. so *dangerous*..
<_death> CL doesn't say.. each implementation can do its own thing
<nij-> Good. Is there anyway to initiate a global lexical variable?
<younder> no
<nij-> Why not?
agrosant has quit [Ping timeout: 264 seconds]
* nij- has a feeling that it's theoretically impossible, in that some contradictions would be made. But he couldn't think through properly.
<_death> you can do (set 'x 123) btw, but I think the behavior is still murky
<nij-> CLHS Notes: The function set is deprecated.
<_death> equivalent to (setf (symbol-value 'x) 123)
<ixelp> CLHS: Function SET
<_death> there's also the symbol-macrolet trick, which lets you implement stuff like deflex.. and implementations sometimes have their own operators, like sb-ext:defglobal
<younder> It's a design decision. One of the major lisp's that influenced the Common Lisp design was MacLisp and that had dynamic scoping. It ran important applications like Macsygma, a symbolic math program. So it became, how can we introduce lexical scope, like in scheme, and keep things familiar to existing applications.
<nij-> I see. Thanks :)
<_death> but then sb-ext:defglobal won't let you rebind
<nij-> Interesting
danse-nr3 has joined #commonlisp
danse-nr3 has quit [Remote host closed the connection]
danse-nr3 has joined #commonlisp
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chomwitt has joined #commonlisp
<ixelp> Re: Macros that build function names — Rob Warnock Lisp usenet archive
<nij-> Is it compliant to write: (let ((w 7)) (defun f () (setf w 8) w) (f)) ?
<nij-> In particular, the (setf w 8) in the defun body.
<_death> sure
danse-nr3 has quit [Read error: Connection reset by peer]
josrr has joined #commonlisp
danse-nr3 has joined #commonlisp
agrosant has joined #commonlisp
AndreiDuma has joined #commonlisp
tyson2 has joined #commonlisp
cage has quit [Remote host closed the connection]
<alcor> On the defun-in-let thing: What's the scope of f in that case? Is that binding only valid within the let?
cage has joined #commonlisp
cage has quit [Remote host closed the connection]
<_death> clhs defun
<ixelp> CLHS: Macro DEFUN
<nij-> It says "Defines a new function named function-name in the global environment. "
pranavats has left #commonlisp [Disconnected: Hibernating too long]
<_death> if you want a "local function", there's labels/flet
decweb has joined #commonlisp
<nij-> paulapatience How is it implemented?! Does it rely on implementation-specific operators?
<paulapatience> You'd have to read its documentation and source code.
<paulapatience> I haven't looked in detail.
<alcor> Okay, so if one evaluates (let ((w 7)) (defun f () (setf w 8)) (defun g () (setf w 9))), then both f, g are global functions that share a binding for w.
<bike> i think it does something goofy with define-symbol-macro.
<nij-> alcor : (let ((w 7)) (defun f () (setf w 8)) (defun g () (setf w 9)) (pprint w) (f) (pprint w) (g) (pprint w))
<nij-> prints 7 8 9
josrr has quit [Remote host closed the connection]
<alcor> I feel like I'm missing some context. Why would one want a global lexical variable? That would be equivalent to globally-scoped symbols in C (with all their issues). Dynamic scoping for globals is superior as it is safely extensible and overridable. Other languages painfully attempt to simulate dynamic scoping with hacks like "contextual variables".
traidare has quit [Ping timeout: 252 seconds]
<nij-> paulapatience Oh I see. It uses another system "global-vars".
<gilberth> Indeed. For all practical purposes just don't bind your global variable. The only difference with a global lexical variable would be that you can shadow it by a local lexical variable of the same name.
<nij-> which is given here: https://github.com/lmj/global-vars
<ixelp> GitHub - lmj/global-vars: Define efficient global variables in Common Lisp.
<nij-> alcor - out of curiosity :/
<gilberth> What I miss however are thread local variables that are thread local even when you haven't bound them.
<nij-> paulapatience And yeah.. it boils down to implementation specific primary operators https://github.com/lmj/global-vars/blob/master/global-vars.lisp#L69
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<_death> alcor: it's true that you don't often want a global lexical.. but sometimes you do want a global "constant", and a naive defconstant won't do.. then you either have more code to set up the defconstant or use defvar, but the latter may also hurt performance due to runtime lookup of the value, so stuff like sb-ext:defglobal is then an alternative
traidare has joined #commonlisp
AndreiDuma has joined #commonlisp
<nij-> ANOTHER stupid question................
<nij-> How do you tell.. how... how do you tell that which version, which repo, is it assuming?
<nij-> I wish dependency specification can be more specific, like specifying the commit hash or location to fetch etc.
<nij-> But it seems that most people in the world don't bother this. There must be something wrong in me.
<paulapatience> You don't
<alcor> Dependency management doesn't exactly fall within the purview of asdf's responsibilities.
<alcor> For that, you have things like quicklisp
<paulapatience> You can also look at qlot and clpm
<alcor> Or, more recently, ocicl
<paulapatience> Or Guix
<paulapatience> Newer programming languages often have an integrated package manager for this stuff.
<alcor> ocicl gives you project-local dependency caching, similar to what you see in the nodejs/npm world. The dependency hashes/versions are stored into a systems.csv (which you should check into your VCS).
<paulapatience> How could you tell what version of what library a C header is supposed to be part of?
<nij-> alcor Oh neat! I'm using qlot but haven't tried ocicl
<alcor> I do believe that ocicl is the most beginner-friendly at this point though (thanks green_), having tested it for a number of small projects. Piggybacking on existing OCI infrastructure for storing systems is neat. The CLI is simple. Package availability is also very good as of late.
<nij-> How does node work on its dependency issue?
<alcor> Node isn't much different with dependency handling. You specify your dependencies and their versions in package.json (equivalent to systems.csv on ocicl). Hashes & origin/version locks are then stored in package-lock.json when you pull/install dependencies. That's the gist of it
<younder> Compared to the mess in python's versioning I'd take quicklisp any day.
<gilberth> I don't get what this define-global can do what a symbol macro cannot. Besides I never felt like needing this lexical global in the first place. Can someone enlighten me?
<edgar-rft> Common Lisp has a runtime compiler, so even if you load a library of some specific version number everything of it can be changed at runtime, that's why version numbers have no real meaning in Common Lisp.
<alcor> quicklisp only maintains a cache of global dependencies though. You can't have it operate in a project-local way (without some hackery, at least). And also it's not granular – basically, the only version you can install of a system is whatever is in the quicklisp repository right now.
<_death> to me snapshots of (third party) libraries are silly, so I just work with git repositories.. because I mostly work alone and CL people tend to not gratuitously break stuff it all works fine.. whenever I fetch new stuff I skim the new commits before merging so that I know what to expect
<younder> I find it hard to believe that you want to work on libraries in a project local way like in python. That is one of the reasons I rarely use python anymore. virtual environment - on per project - with potentially hundreds of copies of similar libraries is my idea of a mess.
<nij-> younder What's the difficulty in that?
<nij-> I find it very pleasing and reproducible.
<alcor> _death: That approach is usually called "dependency vendoring", I believe, and it can be done via git submodules, although you have to manage your require/load path manually if you decide to do things this way.
<_death> alcor: no, I don't vendor dependencies.. I have one big directory with all third party stuff to serve all CL development
<alcor> _death: So you don't at least save the gitref somewhere for each dependency? Doesn't that make it to hard make sense of what revision each dependency is at?
cage has joined #commonlisp
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<skin> I use qlot. it works well enough and is relatively simple. I know you can change libraries at runtime, but this still doesn't sit well with me.
<_death> alcor: I don't keep track of revisions.. like I said it's not often that there's breakage, and if I notice breakage it's usually while reviewing the new commits (when I decide to update all third party stuff, I have some code to help with that).. for my bigger projects I also try and be conservative in adding deps.. so when I update code elsewhere (say on a server) I do need to update deps there as well
<skin> I'd like to look into ocicl, sounds interesting
<alcor> _death: Ok. If it's a project with a single developer, then it's likely not a concern anyway. But giving a reproducibly-buildable source distribution to somebody else (possibly on a different machine/platform) might prove to be a hassle later on.
<_death> alcor: for some third party code I have patches that I have not submitted (yet?) and so I sometimes have to become a maintainer for my fork.. because I work with git repos directly it's no big deal and I can just patch whatever I want without hesitance
<_death> right, with a team there would have to be a more elaborate workflow.. but this is what works for me as a solo dev
<alcor> skin: https://github.com/ocicl/ocicl – it integrates with asdf well too: »The default behavior for the runtime is to invoke ocicl when ASDF tries to load a system that it can't find.«, alternatively it's as simple as running ocicl install <system> in your project root.
<ixelp> GitHub - ocicl/ocicl: An OCI-based ASDF system distribution and management tool for Common Lisp
<skin> reading about its backbone. very cool. https://oras.land/
<ixelp> OCI Registry As Storage | OCI Registry As Storage
<nij-> ocicl seems really nice
rtypo has joined #commonlisp
<nij-> alcor - Does OCICL work well if my lisp still works with quicklisp as well?
<nij-> Or does that mean I have to remove #-quicklisp block from my .sbclrc?
<alcor> nij-: I haven't seen any indication it would conflict with quicklisp.
<alcor> In the end, it just prepends $projectRoot/systems to the CL load path
<alcor> i.e. it will likely prioritize project-local systems installed via ocicl over whatever is in the quicklisp storage.
<alcor> but that is probably what users usually want
<nij-> Nice!
<alcor> Recently, a --global switch was added to ocicl, so systems can be installed to a "global systems" collections in a manner similar to quicklisp. So it can be also used in a manner similar to quicklisp.
<nij-> Amazing.
szkl has joined #commonlisp
danse-nr3 has quit [Remote host closed the connection]
lucasta has joined #commonlisp
danse-nr3 has joined #commonlisp
bendersteed has joined #commonlisp
gorignak has joined #commonlisp
pranavats has joined #commonlisp
ymir has joined #commonlisp
traidare has quit [Ping timeout: 272 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
gorignak has quit [Quit: quit]
rogersm_ has joined #commonlisp
agrosant has quit [Ping timeout: 264 seconds]
traidare has joined #commonlisp
ymir has quit [Ping timeout: 255 seconds]
nij- has quit [Remote host closed the connection]
nij- has joined #commonlisp
AndreiDuma has joined #commonlisp
gorignak has joined #commonlisp
tibfulv has joined #commonlisp
danse-nr3 has quit [Ping timeout: 256 seconds]
kevingal has joined #commonlisp
josrr has joined #commonlisp
Gleefre has joined #commonlisp
nij- has quit [Ping timeout: 264 seconds]
yitzi has joined #commonlisp
ymir has joined #commonlisp
lispmacs[work] has quit [Remote host closed the connection]
yitzi has quit [Ping timeout: 246 seconds]
yitzi has joined #commonlisp
a51 has quit [Quit: WeeChat 4.2.1]
pfdietz has joined #commonlisp
King_julian has quit [Ping timeout: 268 seconds]
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
danse-nr3 has joined #commonlisp
lucasta has quit [Quit: Leaving]
AndreiDuma has joined #commonlisp
traidare has quit [Ping timeout: 252 seconds]
NotThatRPG has quit [Ping timeout: 264 seconds]
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AndreiDuma has joined #commonlisp
Equill has quit [Quit: Gone offline]
awlygj has quit [Quit: leaving]
green_ has quit [Ping timeout: 252 seconds]
rtypo has quit [Read error: Connection reset by peer]
ello has quit [Read error: Connection reset by peer]
ello has joined #commonlisp
rtypo has joined #commonlisp
agrosant has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
ymir has quit [Ping timeout: 255 seconds]
audaine has quit [Remote host closed the connection]
msavoritias has quit [Ping timeout: 268 seconds]
bendersteed has quit [Quit: bendersteed]
danse-nr3 has quit [Read error: Connection reset by peer]
tyson2 has quit [Read error: Connection reset by peer]
danse-nr3 has joined #commonlisp
agrosant has quit [Ping timeout: 264 seconds]
Cymew has quit [Ping timeout: 264 seconds]
cmack has quit [Remote host closed the connection]
a51 has joined #commonlisp
zetef has joined #commonlisp
eddof13 has joined #commonlisp
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waleee has quit [Quit: WeeChat 4.1.2]
nij- has joined #commonlisp
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
ymir has joined #commonlisp
alcor has quit [Remote host closed the connection]
AndreiDuma has joined #commonlisp
igemnace has quit [Quit: WeeChat 4.2.1]
green_ has joined #commonlisp
wacki has joined #commonlisp
NotThatRPG has joined #commonlisp
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alcor has joined #commonlisp
yitzi has quit [Ping timeout: 268 seconds]
yitzi has joined #commonlisp
kamafam has quit [Quit: kamafam]
tyson2 has joined #commonlisp
yottabyte has joined #commonlisp
mgl has quit [Ping timeout: 255 seconds]
AndreiDuma has joined #commonlisp
msavoritias has joined #commonlisp
green_ has quit [Ping timeout: 240 seconds]
msavoritias has quit [Ping timeout: 268 seconds]
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zetef has quit [Ping timeout: 272 seconds]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
jmiven has quit [Quit: reboot]
jjnkn has joined #commonlisp
jmiven has joined #commonlisp
AndreiDuma has joined #commonlisp
AndreiDuma has quit [Client Quit]
msavoritias has joined #commonlisp
ymir has quit [Ping timeout: 252 seconds]
AndreiDuma has joined #commonlisp
dnhester` has quit [Ping timeout: 268 seconds]
dnhester` has joined #commonlisp
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ymir has joined #commonlisp
ldb has joined #commonlisp
AndreiDuma has joined #commonlisp
danse-nr3 has quit [Ping timeout: 252 seconds]
agrosant has joined #commonlisp
tfeb has joined #commonlisp
tfeb has quit [Client Quit]
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
agrosant has quit [Ping timeout: 264 seconds]
ldb has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
traidare has joined #commonlisp
agrosant has joined #commonlisp
msavoritias has quit [Remote host closed the connection]
King_julian has joined #commonlisp
King_julian has quit [Remote host closed the connection]
King_julian has joined #commonlisp
nij- has quit [Ping timeout: 268 seconds]
tyson2 has quit [Remote host closed the connection]
nij- has joined #commonlisp
<nij-> How to refer to the function itself while defining it in its body?
<nij-> Something like (defun f () (pprint "It's me, ~s" SELF))
<nij-> f ;; <function stored at x0ABCD>
<nij-> f() ;; "It's me, <function stored at x0ABCD>"
waleee has joined #commonlisp
<alcor> Um, just use f? It should work.
<alcor> (defun f () (pprint "It's me, ~s" #'f)) or something like that should work.
<nij-> But the name f may be assigned to some other functions later.
<nij-> I should rephrase my question.. in that the function has to be a lambda.
<alcor> clhs labels
<ixelp> CLHS: Special Operator FLET, LABELS, MACROLET
luna-is-here has quit []
<nij-> ! lemme try
<bike> (labels ((f () (format t "It's me, ~s" #'f))) ...)
<alcor> ^
<nij-> Amazing.
<nij-> Thanks!
pfdietz has quit [Quit: Client closed]
luna-is-here has joined #commonlisp
agrosant has quit [Ping timeout: 264 seconds]
<jjnkn> You could also call a lambda with itself using a helper function: (defun call (f &rest args) (apply f f args)) and then use it like: (call (lambda (me) (pprint "It's me, ~s" me)))
<jjnkn> Or go further and define the Y combinator: https://mvanier.livejournal.com/2897.html
<ixelp> The Y Combinator (Slight Return) - Mike's World-O-Programming — LiveJournal
<nij-> :O
AndreiDuma has joined #commonlisp
jjnkn has quit [Quit: leaving]
ymir has quit [Ping timeout: 264 seconds]
King_julian has quit [Ping timeout: 252 seconds]
mgl has joined #commonlisp
agrosant has joined #commonlisp
tyson2 has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.2]
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
agrosant has quit [Ping timeout: 264 seconds]
NotThatRPG has quit [Read error: Connection reset by peer]
AndreiDuma has joined #commonlisp
NotThatRPG has joined #commonlisp
mgl has quit [Ping timeout: 268 seconds]
wacki has quit [Ping timeout: 255 seconds]
wacki has joined #commonlisp
ymir has joined #commonlisp
gilberth has quit [Ping timeout: 264 seconds]
ixelp has quit [Ping timeout: 272 seconds]
ixelp has joined #commonlisp
ymir has quit [Read error: Connection reset by peer]
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yitzi has quit [Remote host closed the connection]
traidare has quit [Ping timeout: 268 seconds]
chomwitt has quit [Ping timeout: 240 seconds]
akoana has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
kevingal has quit [Ping timeout: 268 seconds]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
traidare has joined #commonlisp
ymir has joined #commonlisp
pve has quit [Quit: leaving]
NotThatRPG has quit [Quit: Textual IRC Client: www.textualapp.com]
traidare has quit [Ping timeout: 252 seconds]
zetef has joined #commonlisp
ymir has quit [Read error: Connection reset by peer]
chomwitt has joined #commonlisp
son0p has quit [Ping timeout: 260 seconds]
son0p has joined #commonlisp
younder has quit [Remote host closed the connection]
younder has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
younder has quit [Remote host closed the connection]
zetef has quit [Remote host closed the connection]
younder has joined #commonlisp
reb has quit [Remote host closed the connection]
skeemer has joined #commonlisp
reb has joined #commonlisp
ymir has joined #commonlisp
agrosant has joined #commonlisp
a51 has quit [Quit: WeeChat 4.2.1]
zaymington has quit [Ping timeout: 268 seconds]
akoana has quit [Quit: leaving]
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
pfdietz has joined #commonlisp
chomwitt has quit [Ping timeout: 268 seconds]
agrosant has quit [Ping timeout: 264 seconds]
nij- has joined #commonlisp
pillton has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
agrosant has joined #commonlisp
<nij-> When sbcl compiles an AST, it outputs a code written in assembly. However, if there are constants or literals in the AST, the code while executed needs to get access to them. But how?
agrosant has quit [Ping timeout: 264 seconds]
gilberth has joined #commonlisp
<aeth> (defun foo () 42) (disassemble #'foo)
<aeth> of particular interest, ; F3: BA54000000 MOV EDX, 84
<aeth> everything's ASHed 1 over so (ash 42 1) => 84 and (ash 84 -1) => 42
yitzi has joined #commonlisp
<aeth> that's the minimum amount of type tag for a fixnum. Other implementations and even SBCL in other architectures may use more
<yitzi> nij-: Or load-time values for FASLs
dnhester` has quit [Ping timeout: 272 seconds]
alcor has quit [Read error: Connection reset by peer]
<aeth> but replace 42 with 42d0 and you get ; 83: 488B15C6FFFFFF MOV RDX, [RIP-58] ; 42.0d0
<aeth> same with 42f0 even though single-float doesn't have to be boxed
<nij-> aeth, sure, CL integers have representations in assembly.
<nij-> How about more complicated objects, like functions?
<nij-> yitzi What load-time vals?
<aeth> functions need indirection because you can redefine them so you want to look them up by name
<aeth> try (defun foo ()) (defun bar () #'foo) (disassemble #'bar)
<nij-> I see. ; B4: EBFDFF58 LDR R1, #x7006187970 ; #<SB-KERNEL:FDEFN F>
<nij-> That means it's referring to that function F by its memory address?!?
<yitzi> nij-: Look in the spec at load-time-value and make-load-form. Its how CL reconstructs literals when loading from a FASL.
<nij-> It doesn't keep a vector for it at all? It just lets F hangs there, and stuff the memory address into the compiled code?
<aeth> fdefn f, which means it's looking up the definition of F with that. One level of indirection
<nij-> aeth What fdefn f?
<bike> the comment. "#<SBC-KERNEL:FDEFN F>"
<aeth> SBCL is nice about commenting most of its asm
<aeth> though a lot of implementations turn their asm into s-expressions, which is nice in a different way
<aeth> yitzi: right, the next step would be to make-load-form, in particular using the trivial make-load-form-saving-slots
<ixelp> CLHS: Function MAKE-LOAD-FORM-SAVING-SLOTS
<aeth> and then see what it disassembles to
attila_lendvai has quit [Ping timeout: 246 seconds]
dino_tutter has quit [Ping timeout: 255 seconds]
<aeth> (defclass foo () ()) (defmethod make-load-form ((object foo) &optional environment) (make-load-form-saving-slots object :environment environment)
<aeth> (defun foobar () (make-instance 'foo)) (disassemble #'foobar)
<aeth> (defun barfoo () #.(make-instance 'foo)) (disassemble #'barfoo)
leeb has quit [Ping timeout: 255 seconds]
<nij-> @@..
dnhester` has joined #commonlisp
shka has quit [Ping timeout: 268 seconds]
dnhester` has quit [Ping timeout: 260 seconds]
donleo has quit [Ping timeout: 272 seconds]
traidare has joined #commonlisp