Xach 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>
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
<bollu> What does &body and @body mean? I see it in this video by baggers: https://youtu.be/4nKe2vp07Yg?t=2871
karlosz has quit [Quit: karlosz]
jstoddard has quit [Quit: ERC (IRC client for Emacs 27.2)]
s-liao has joined #commonlisp
<bollu> https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node64.html this seems to answer the use of @
<bollu> Still not sure what & is. Googling for sigils is surprisingly hard..
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
nij- has joined #commonlisp
<yitzi> clhs lambda lists
karlosz has joined #commonlisp
<yitzi> clhs 3.4
<yitzi> bollu: See above. &body is a marker in macro lambda lists
<moon-child> what is @body though? I have never seen that
<yitzi> Does it have a comma before it?
<moon-child> oh, no idea but that sounds plausible
<akoana> probably `(something ...,@ ...
<yitzi> commas are splicing inside of backquote
<yitzi> clhs 2.4
Oladon has quit [Quit: Leaving.]
miique has quit [Ping timeout: 240 seconds]
gaqwas has joined #commonlisp
miique has joined #commonlisp
jpl01 has joined #commonlisp
waleee has quit [Ping timeout: 256 seconds]
waleee has joined #commonlisp
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
pve has quit [Ping timeout: 256 seconds]
huckleberry has joined #commonlisp
VincentVega has quit [Remote host closed the connection]
gaqwas has quit [Remote host closed the connection]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
lottaquestions has quit [Quit: Konversation terminated!]
OlCe has quit [Ping timeout: 256 seconds]
waleee has quit [Ping timeout: 240 seconds]
jpl01 has quit [Remote host closed the connection]
waleee has joined #commonlisp
rgherdt_ has quit [Remote host closed the connection]
rgherdt_ has joined #commonlisp
epony has quit [Ping timeout: 240 seconds]
notzmv has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
raeda_ has quit [Ping timeout: 256 seconds]
raeda has joined #commonlisp
rgherdt_ has quit [Ping timeout: 256 seconds]
OlCe` has joined #commonlisp
sloanr has quit [Ping timeout: 240 seconds]
nij- has quit [Remote host closed the connection]
sloanr has joined #commonlisp
karlosz has quit [Ping timeout: 240 seconds]
gaqwas has joined #commonlisp
sloanr has quit [Read error: Connection reset by peer]
s-liao has quit [Quit: Client closed]
rotateq has quit [Quit: ERC (IRC client for Emacs 27.2)]
s-liao has joined #commonlisp
nij- has joined #commonlisp
Bike has quit [Quit: Lost terminal]
jstoddard has joined #commonlisp
gaqwas has quit [Ping timeout: 240 seconds]
<jstoddard> etimmons: I don't know if you still need this, but :package-local-nicknames is indeed in *features* on Lispworks 8.0.
perro_ has quit [Read error: Connection reset by peer]
nij- has quit [Ping timeout: 240 seconds]
<bollu> Stupid question: Is paredit worth learning?
Bike has joined #commonlisp
<jstoddard> bollu: As a mere dabbler my opinion isn't worth much, but paredit has always frustrated the hell out of me. Over the last few weeks I made the effort to take a better attitude toward it, and became comfortable with the basic keystrokes. I guess I can say I don't hate it anymore.
<jstoddard> I know a lot of lispers swear by it. I am beginning to understand that point of view, even if I don't necessarily share it.
<jstoddard> On the other hand, I forked out the cash for hobbyist LispWorks this week, and have been playing around with its IDE since last night. I don't miss the lack of paredit, but I do miss SLIME's feature of showing me arguments in the minibuffer for the function or macro whose name I just typed.
huckleberry has quit [Quit: disconnected]
<bollu> jstoddard lispworks has that feature, actually. (editor:bind-key "Function Arglist Displayer" "Control-i" :mode "Lisp")
<bollu> [quite funny, I just moved from lispworks personal edition to emacs :) ]
<jstoddard> Oh cool, thanks for pointing it out. I'm actually reading through the LW editor manual right now, which I started hoping to find out if there was such a feature (in addition to learning the regular key bindings for compile-defun, etc.)
<jstoddard> I would say it's worth learning paredit, and trying it out for at least a few days. Afterward you may find you can't do without it. Or if not, what have you lost?
s-liao has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
Alfr has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 256 seconds]
Alfr has joined #commonlisp
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
Oladon has joined #commonlisp
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
Alfr has quit [Remote host closed the connection]
<jasom> I also didn't care for paredit, but it was interesting to try
Alfr has joined #commonlisp
<beach> Good morning everyone!
<beach> jeosol: This is the paper I often talk about: https://web.cecs.pdx.edu/~apt/cs457_2005/hudak-jones.pdf
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
<beach> jeosol: They authors are in the Haskell camp, so the conclusion of the paper is mainly about Haskell, but when I present the paper to (say) industry people, I moderate the conclusion, especially since Haskell is not the language that comes out best in the comparison.
<beach> I simply conclude that there is evidence that the productivity of different programming languages for a given task can vary a lot. The paper suggests up to a factor 20, but even if it is just a factor 2, that's huge in an industrial context.
semz has quit [Ping timeout: 268 seconds]
<jasom> I almost always prototype in lisp. I am convinced that prototyping in lisp and porting to a more "business friendly" language is faster for me. Also since not all prototypes lead to production implementations, there's zero cost of rewriting in those cases
<beach> jeosol: Another thing I often point out is that it is nearly impossible to convince anyone of the virtues of Common Lisp by just showing them some code and arguing with them. They only method that I have found to work is to show them that you can get the job done very quickly with high-quality code.
<beach> jasom: Good point.
wyrd has joined #commonlisp
<jasom> The only time I think I ever impressed someone with CL was when we were debugging a performance issue in a complicated system. I wrote a simplified simulation in CL and added complications until we saw a similar performance profile. They were impressed by how quickly I could iterate. Every dynamic language *should* be as productive as lisp for this sort of thing, but the tooling is often
<jasom> lacking.
cosimone has quit [Remote host closed the connection]
<beach> There seems to by this underlying assumption, especially with decision makers in industry, that all programming languages are basically the same in terms of functionality and productivity. So the choice of a programming language is made based on other factors, such as what language(s) existing programmers already know.
<beach> The paper by Hudak and Jones also shows that the cost of learning a new language is dwarfed by the potential difference in productivity.
cosimone has joined #commonlisp
<jasom> I wonder if the latter issue is less bad nowadays; many programmers need to know both javascript and (some other language) so perhaps more people are aware of how picking up a new language isn't that hard?
<jasom> certainly companies that use non-mainstream languages know because they almost always have to train new hires on their language.
<beach> That might be true.
<jasom> Though I must admit, less than 2 weeks (I assume it was 8 business days?) to learn a language already showing results impressed me.
<jasom> but I've also never had learning a new programming language be my full-time job.
<beach> Yes, and again, even if it is 10 times that, it is still dwarfed by the productivity issue.
<jasom> yeah, if you assume you retain an employee for 18 months then 90 days would only need a 10% productivity boost to break even
<beach> That's what impresses me so much about the paper. Even if you divide their findings by 10, you still get something that must be considered.
<jasom> er 45 days
<beach> Exactly.
semz has joined #commonlisp
<jasom> many companies are *exremely* reluctant to spend time on training though.
<beach> Yes, because they think the cost is significant. The paper suggests it is not.
<beach> I mean, I know how companies operate. They take into account only what can be measured, and assume the rest is insignificant. Productivity is hard to measure, especially to determine a priory, so it is assumed that the language makes no difference. Training, on the other hand, shows up very clearly in the budget.
<jasom> Also anything different is to blame for all failures
<beach> But that's my main problem with how industry works. If managers do no more than what an Excel spreadsheet can do, then they should be replaced by one.
<beach> The job of a manager is to do all the rest, based on intuition, experience, and expertise. But since they don't have any, they do no more that what Excel does.
s-liao has quit [Ping timeout: 256 seconds]
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
thomaslewis has joined #commonlisp
s-liao has joined #commonlisp
wyrd has quit [Quit: leaving]
wyrd has joined #commonlisp
wyrd has quit [Client Quit]
wyrd has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
s-liao has quit [Quit: Ping timeout (120 seconds)]
Jing has joined #commonlisp
epony has joined #commonlisp
jgkamat has quit [Quit: ZNC - https://znc.in]
jgkamat has joined #commonlisp
<jeosol> Good morning all
<jeosol> beach: thanks for the linking that paper again. That's the one I was referring to
<jeosol> beach: very true - what works is to show the evidence of the work done
Bike has quit [Quit: Connection closed]
aartaka has joined #commonlisp
parjanya has quit [Read error: Connection reset by peer]
rackethelp has joined #commonlisp
Oladon has quit [Quit: Leaving.]
jstoddard has quit [Quit: Leaving]
jmes has joined #commonlisp
OlCe` has quit [Remote host closed the connection]
<jmes> Hey, what ways to you Lispers prefer to download files with CL? I want to download and extract a project from it's git repository and I'm tempted to use run-program to call wget but I have a feeling that's really dumb :P
travv0 has joined #commonlisp
<jmes> its*
Jing has quit [Remote host closed the connection]
Jing has joined #commonlisp
rackethelp has quit [Quit: Client closed]
rackethelp has joined #commonlisp
Jing has quit [Remote host closed the connection]
Jing has joined #commonlisp
<moon-child> jmes: your keyword is 'http client'
OlCe` has joined #commonlisp
<jmes> moon-child: Thanks, I stumbled across drakma and trivial-download which uses it. I'll give it a try!
<moon-child> (though--if you are looking to download a git project, you probably want a git implementation rather than an http implementation. I seem to recall there was a pure-cl git implementation, but can not find it now; that's being the case, I might shell out to git (rather than wget) or try a libgit2 binding)
s-liao has joined #commonlisp
OlCe` has quit [Ping timeout: 256 seconds]
sp has quit [Ping timeout: 240 seconds]
sp has joined #commonlisp
theothornhill has quit [Ping timeout: 240 seconds]
OlCe`` has joined #commonlisp
<jmes> moon-child: Yeah I would do that but I'm only looking to get a directory from a project given a commit hash. So it seems better to download and extract a compressed file that to clone the whole thing.
<jmes> i.e. I don't need any git features
s-liao has quit [Ping timeout: 256 seconds]
Gnuxie has quit [Ping timeout: 240 seconds]
Mrtn[m] has quit [Ping timeout: 240 seconds]
Bi[m] has quit [Ping timeout: 240 seconds]
linjian has quit [Ping timeout: 240 seconds]
Jing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lisp123 has joined #commonlisp
<moon-child> jmes: hm, you would still need to parse the git format and structure, which is not trivial and which I believe uses a custom compressed format
<moon-child> would not be easy with wget either
qhong has quit [Read error: Connection reset by peer]
Bi[m] has joined #commonlisp
Mrtn[m] has joined #commonlisp
linjian has joined #commonlisp
Gnuxie has joined #commonlisp
qhong has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
<jmes> moon-child: my wget version just grabs a snapshot of the whole tree e.g. <commit>.tar.gz, decompresses it, and discards the unneeded stuff
parjanya has joined #commonlisp
<moon-child> ah, github?
<jmes> Yeah, I'm just writing some shoddy code for a *very* specific purpose (it only ever needs to interact with one known repository). Normally I'd use a shell script but I'm just trying to get more familiar with lisp for assorted things.
nij- has joined #commonlisp
travv0 has left #commonlisp [#commonlisp]
mingus has joined #commonlisp
rgherdt_ has joined #commonlisp
pve has joined #commonlisp
rackethelp has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
x88x88x has quit [Remote host closed the connection]
x88x88x has joined #commonlisp
mingus has quit [Ping timeout: 256 seconds]
gaqwas has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
s-liao has joined #commonlisp
mingus has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
mingus has quit [Ping timeout: 256 seconds]
igemnace has joined #commonlisp
Jing has joined #commonlisp
Kyuvi has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
rotateq has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
Lord_of_Life_ is now known as Lord_of_Life
mingus has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
Kyuvi has quit [Ping timeout: 256 seconds]
mingus has quit [Ping timeout: 256 seconds]
amb007 has quit [Ping timeout: 256 seconds]
s-liao has quit [Ping timeout: 256 seconds]
gaqwas has joined #commonlisp
amb007 has joined #commonlisp
Qwnavery has joined #commonlisp
s-liao has joined #commonlisp
igemnace has quit [Read error: Connection reset by peer]
mingus has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
mingus has quit [Ping timeout: 240 seconds]
igemnace has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
Qwnavery has quit [Quit: WeeChat 3.4]
myrrh has joined #commonlisp
cage has joined #commonlisp
mingus has joined #commonlisp
igemnace has quit [Ping timeout: 240 seconds]
mingus has quit [Ping timeout: 240 seconds]
random-nick has joined #commonlisp
gaqwas has joined #commonlisp
igemnace has joined #commonlisp
tfeb has joined #commonlisp
tfeb is now known as tfb
tfb has quit [Quit: died]
gaqwas has quit [Remote host closed the connection]
nij- has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
nij- has joined #commonlisp
<Xach> jmes: i use run-program an awful lot for things like that. but i wrap it in functions and it's usually pretty nice.
<Xach> like (resize-image image-file :max-x 600) ends up being a call to imagemagick
<Xach> or (ensure-checkout project directory) runs git underneath
<Xach> i'd personally rather do that than ffi 99.7% of the time
<moon-child> better than ffi. But worse than pure-cl :^)
<Xach> Yes, for most axes except time-to-something-useful
<Xach> (assuming that a pure cl version must be written)
<moon-child> yeah. I swear there is pure-cl git, but can not find it
<moon-child> maybe I was just confusing it with the libgit2 bindings
<Xach> moon-child: no, i remember someone working on it, but it was 10+ years ago
<moon-child> ok
<moon-child> (google has gone all to pot these days, not surprising it is hard to find)
s-liao has joined #commonlisp
gaqwas has joined #commonlisp
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
kevingal has joined #commonlisp
tfeb has joined #commonlisp
tfeb is now known as tfb
Kyuvi has joined #commonlisp
tfb has quit [Quit: died]
cosimone` has joined #commonlisp
cosimone has quit [Ping timeout: 268 seconds]
xsperry has quit [Killed (NickServ (GHOST command used by aldkjsfasdf!~xs@cpe-188-129-71-242.dynamic.amis.hr))]
xsperry has joined #commonlisp
Bike has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
<bollu> For whatever reason, when I compile a file that uses closer2mop, I get an error saying that C2MOP does not exist. However, when I execute the line that imports C2MOP and THEN compile the file, the compilation works: https://gist.github.com/bollu/c1d974dea1c3f46d58dc103a88dd32c1#file-hoopl-lisp-L175
<bollu> That is, running |C-c C-k| upon opening the file fails. But running |slime-eval-defun| at the line (ql:quickload "closer-mop") followed by |C-c C-k| succeeds.
<bollu> What's going on?
<Bike> compiling the file happens before loading
<Bike> so, it tries to compile the c2mop:whatever form before it's actually executed the quickload of closer-mop
<Bike> there is a way to arrange things so that the quickload will be executed during compilation, but for nontrivial code it's usually best to arrrange an actual system definition with asdf
<bollu> Where can I learn how to setup a system definition?
gaqwas has quit [Remote host closed the connection]
<_death> you should defsystem, but note that C-c C-l can load the file
<Shinmera> bollu: look at some other quicklisp project's source code.
<Shinmera> In other news, damn this is pretty cool! https://github.com/julian-baldwin/parachute-browser
<Bike> yeah, i don't know if there's a good guide
<Bike> https://github.com/s-expressionists/Cleavir/blob/main/BIR/cleavir-bir.asd here's one i wrote. you can also simplify by using :serial t
<Bike> the :depends-on are external dependencies, like closer-mop for you
<_death> bollu: https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/#s33-systems .. you can also look at other projects to get a feel
s-liao has quit [Quit: Client closed]
<bollu> thanks!
<yitzi> bollu: You could also go look at one of the trivial systems since they usually have a very simple system declaration. Then just go skim the asdf manual.
<bollu> how does one install asdf on windows? [I'm on windows for extraneous reasons, but I don't see myself being able to switch to *nix for ~3 months]
<Shinmera> you don't install asdf
<Bike> asdf comes with sbcl.
<yitzi> Comes with the implementation/quicklisp.
<bollu> cool :)
<Bike> and quicklisp uses it, so if you have quicklisp working you definitely have asdf.
<yitzi> Also useful is the ASDF section on configuring https://common-lisp.net/project/asdf/asdf.html#Configuring-ASDF
<yitzi> And section 8 further down.
<Bike> for basic use, you can use quicklisp/local-projects
<yitzi> Bike is correct ... the stuff I mentioned is when you want to have more control.
jstoddard has joined #commonlisp
Everything has joined #commonlisp
wyrd has quit [Ping timeout: 276 seconds]
cosimone` has quit [Ping timeout: 256 seconds]
cosimone` has joined #commonlisp
cosimone` has quit [Ping timeout: 268 seconds]
<bollu> Can I have an expression time out and throw an error if it doesn't terminate in X seconds?
<bollu> I'm writing some complicated recursive algorithm for which I don't have a termination proof ;) I'd like to be sure that I don't accidentally hang my REPL or some such
<yitzi> bollu: There is a with-timeout macro in the v2 api of bordeaux-threads. The API docs are not done so you will have to look in the docstrings.
gaqwas has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Bike has quit [Quit: Connection closed]
<pjb> bollu: or you may want to do it conformingly? Define your own operators + - * / etc, and add testing for (get-universal-time).
<phoe> launch the computation in one thread wrapped in (catch :oops ...), interrupt it with #'bt:interrupt-thread (lambda () (throw :oops nil))
<Shinmera> phoe: that's not guaranteed to work
miique has quit [Read error: Connection reset by peer]
<phoe> yes, the thread can loop forever in some sort of WITHOUT-INTERRUPTS
<bollu> Shinmera can you give me an example of a project that uses quicklisp?
<Shinmera> ?
<Shinmera> I said a project *in* quicklisp
<Shinmera> not using it
<bollu> oh
<Shinmera> anything in ql will have an asdf system definition
monaaraj has joined #commonlisp
<bollu> I haven't succeeded yet , though I now know that "system" is an ASDF concept, while "package" is a module that controls visibility
<Shinmera> so just M-. to some library and look at its source.
<pjb> bollu: for example: https://termbin.com/rietk
<bollu> I'm not sure how to actually say that I want closer-mop as a dependency
<phoe> in your ASD file, (asdf:defsystem ... :depends-on (#:closer-mop) ...)
<pjb> (:depends-on "closer-mop")
<phoe> pjb: actually not
<phoe> that's defpackage syntax
<bollu> What is a #:symbol?
<phoe> #:foo is a notation for a symbol which has no home package, a so-called "gensym"
shka has joined #commonlisp
<bollu> |(defsystem :hoopl :depends-on (#:closer-mop #:fset))| errors with |The variable #:FSET is unbound.|
<phoe> you tried to evaluate it
<bollu> yep
<phoe> (asdf:defsystem ...) will work a tiny bit better
<phoe> but even better - don't evaluate it, save it in the ASD file and then try (asdf:load-system :my-system) or (ql:quickload :my-system)
<phoe> where :my-system is your system name
<beach> Or put (cl:in-package #:asdf-user) at the beginning of the file.
<jmes> Interesting I didn't know about #: - is there a problem with using :foo or "foo" in asd files?
<phoe> :foo interns a keyword that will then come up in your editor's suggestions
<phoe> and some people find it annoying
<bollu> Ohh
<phoe> same stuff with non-keyword symbols
<yitzi> phoe: is Ecclesia still alive? Looks there is stuff in Cleavir that still refers to cleavir-code-utilities.
<jmes> Okay, noted :)
<phoe> yitzi: I have no idea, possibly not
<bollu> So now I have two files: `hoopl.asd` which has: |(defsystem :hoopl :depends-on (#:closer-mop #:fset))| and then a `hoopl.lisp` which has |(ql:quickload :hoopl)| followed by my code. Does this sound correct?
<phoe> last commit was 14 months ago so I guess it's dead
<yitzi> phoe: thanks.
<beach> bollu: No, you do the quickload from the REPL.
* phoe kills the repository
<yitzi> beach: Same question to you. Looks like cleavir-macroexpand-all is still dependent on cleavir-code-utilites.
<phoe> ...oh wait
<phoe> I am unable to kill that repository!
<bollu> beach I feel I'm misunderstanding. I want to be able to say "hey, slime, compile this file" and have it compile with no extra intervention.
<phoe> minion: memo for Bike: can you archive and/or delete https://github.com/s-expressionists/Ecclesia/ - seems like it didn't catch on
<minion> Remembered. I'll tell Bike when he/she/it next speaks.
<pjb> jmes: and #:foo makes it more difficult on asdf since systems are named with lower-case strings; with #:foo, it has to create a symbol, named "FOO", then it has to take its symbol-name and downcase it, to find the system name. I prefer to give it "foo" directly.
<beach> yitzi: I am not sure that macro-expand-all is useful.
<phoe> bollu: C-c C-c in a buffer
<phoe> or rather C-c C-k for a whole file
<beach> bollu: Then use a SLIME command that does ASDF:LOAD-SYSTEM.
<bollu> beach what slime command is that, do you know?
<yitzi> beach: In general or just cleavir's implementation?
<beach> bollu: I usually do it in the REPL so I don't remember.
<beach> yitzi: The latter.
<yitzi> beach: got it thanks.
<beach> yitzi: I may not even have written it.
<beach> yitzi: What does git blame say?
<yitzi> beach: Looks like it is mostly yours, but it is like 3 years old and no one has touched it really.
<beach> Hmm.
<beach> I certainly don't use it.
<beach> But it may need to be adapted to Trucler.
<yitzi> Ok. Thanks.
<beach> Sure. Sorry I can't be of more help. :(
<yitzi> beach: No worries. I wasn't critical.
<yitzi> s/I/It/
<beach> bollu: You don't want to put the DEFPACKAGE in the ASDF file.
<bollu> When I open hoopl.lisp and C-c C-k (slime-compile-and-load-file), it fails with | READ error during COMPILE-FILE: Package C2MOP does not exist. Line: 173, Column: 56, File-Position: 5682|
<beach> bollu: Create a package.lisp file and include it in the system definition. Usually first.
<beach> bollu: First in the package.lisp file, but (cl:in-package #:common-lisp-user) and first in every other .lisp file, put (cl:in-package #:hoople).
<pjb> bollu: with more chrome: https://termbin.com/x22h
<beach> bollu: And don't :USE :ASDF.
<beach> bollu: You can check existing systems and libraries for how they are organized.
<beach> bollu: Here is a small example: https://github.com/robert-strandh/Clobber
mingus has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
aeth has quit [Ping timeout: 256 seconds]
aeth has joined #commonlisp
mingus has quit [Ping timeout: 240 seconds]
tyson2 has joined #commonlisp
<bollu> beach thanks for the small example, that's a ton clearer
<beach> Oh, good!
<beach> bollu: So the slime command is apparently M-x slime-load-system, and it doesn't seem to have a keyboard shortcut, so I guess you would need to either attach a keyboard shortcut to it, or do M-x M-p<RET><RET>
<beach> And there is a REPL shortcut it seems.
<beach> ,load-system
<beach> bollu: That's in section 8.8 (entitled ASDF) of the SLIME manual.
phantomics has quit [Excess Flood]
phantomics has joined #commonlisp
varjag has joined #commonlisp
mingus has joined #commonlisp
mingus has quit [Ping timeout: 240 seconds]
Patternmaster has quit [Ping timeout: 252 seconds]
Patternmaster has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
dim has quit [Ping timeout: 250 seconds]
dim has joined #commonlisp
Bike has joined #commonlisp
akoana has quit [Quit: leaving]
igemnace has quit [Remote host closed the connection]
Everything has quit [Quit: leaving]
_death has quit [Ping timeout: 245 seconds]
adeht has joined #commonlisp
Jing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skyl4rk has quit [Ping timeout: 245 seconds]
skyl4rk has joined #commonlisp
wyrd has joined #commonlisp
mingus has joined #commonlisp
rain3 has joined #commonlisp
aeth has quit [Ping timeout: 240 seconds]
aeth has joined #commonlisp
mingus has quit [Ping timeout: 256 seconds]
waleee has joined #commonlisp
z3t0 has joined #commonlisp
<bollu> I get new errors of the form: USE-PACKAGE #<PACKAGE "CLOSER-MOP"> causes name-conflicts in #<PACKAGE "HOOPL"> between the following symbols: CLOSER-MOP:DEFMETHOD, COMMON-LISP:DEFMETHOD [Condition of type NAME-CONFLICT]
<Bike> ooh right, closer mop is weird that way
<Bike> here's the relevant bit from the readme:
<Bike> "Note that in some cases, symbols from the underlying MOP implementation or even the underlying COMMON-LISP package are shadowed in Closer to MOP. So if you use the CLOSER-MOP package you may need to shadow-import those symbols. Alternatively, you can use the packages CLOSER-COMMON-LISP and CLOSER-COMMON-LISP-USER that provide the symbols of
<Bike> COMMON-LISP / COMMON-LISP-USER plus the symbols of the CLOS MOP and the necessary shadow-imported symbols."
<bollu> so how does one setup this shadow-import
<Bike> i would just do (:use #:closer-common-lisp) instead of (:use #:cl #:closer-mop)
<Bike> but if you want to do it yourself, you'll want your package definition to include (:shadowing-import-from #:closer-mop ...symbol names...)
<bollu> Bike I believe fset also does this type of shadowing?
<bollu> Bike is there a :shadowing-use or some such I can use without having to list stuff?
Algernon69 has joined #commonlisp
Bike has quit [Quit: Ping timeout (120 seconds)]
mingus has joined #commonlisp
ck_ has quit [Quit: leaving]
gaqwas has joined #commonlisp
waleee has quit [Ping timeout: 240 seconds]
Bike has joined #commonlisp
<Bike> bollu: i don't know what fset does. there is not a shadowing-use. the closer-common-lisp package is supposed to be the more convenient alternative.
<Bike> looks like fset does indeed do some shadowing imports.
waleee has joined #commonlisp
ck_ has joined #commonlisp
<etimmons> uiop:define-package has :mix which is pretty much a :shadowing-use.
<bollu> what is uiop now? xD
<phoe> like asdf, just another part of the keyboard
<phoe> seriously though - a utility package that ships with ASDF
tyson2 has quit [Remote host closed the connection]
<bollu> I see
hobo has joined #commonlisp
myrrh has quit [Quit: Lost terminal]
mingus has quit [Ping timeout: 256 seconds]
<Josh_2> With asdf:make can I use a function to generate the binary name?
<Josh_2> I'd like to append the systems version number to the build pathname
<Josh_2> ofcourse I dont want to do it manually each time I bump the version
<phoe> asdf:make is a function
<phoe> I assume you can pass it an argument like (asdf:make ... :pathname (compute-name) ...)
<phoe> or do you mean something else?
amb007 has quit [Ping timeout: 256 seconds]
thomaslewis has left #commonlisp [#commonlisp]
<Josh_2> I can probably just use reader macros to generate the path
<Josh_2> I will try
<phoe> I assume you can specialize asdf:operate on (eql 'asdf:build-op) and your system name, slap an :around method on it and add explicitly modify the pathname keyword
<phoe> ah, yes, the dirty but effective way
<Josh_2> Alright
amb007 has joined #commonlisp
<bollu> Does this initialization sequence seem right: Open hoopl.asd, run C-c C-k [compile file]. Switch to REPL, then run (ql:quickload hoopl). Finally switch to hoopl.lisp and type C-c ~ [slime-sync-package-and-default-directory] to enter the hoopl module in the repl
<Josh_2> Okay the reader macro doesn't work
<Josh_2> phoe: I am using :build-operation and :build-pathname within asdf:defsystem
<phoe> bollu: you shouldn't need to compile the ASD file
<phoe> or load it
<phoe> ASDF should load it on your own when you QL:QUICLLOAD it
<phoe> QUICKLOAD*
<Josh_2> Where is the documentation for asdf make?
<yitzi> Pretty sure its in the asdf manual.
<Josh_2> Yeh I have to build it manually
<Josh_2> can't find a recent version online from the looks of it
<phoe> Josh_2: huh? https://common-lisp.net/project/asdf/asdf.html contains an entry for make
Algernon69 has quit [Read error: Connection reset by peer]
<yitzi> I don't think there are updates beyond version bumping to https://common-lisp.net/project/asdf/asdf.html
<phoe> search the page for "Function: make system &rest"
<Josh_2> Alright I was very much looking at an old version hosted by sbc
<Josh_2> sbcl*
<phoe> and then read up on :build-operation linked from there
john__ has joined #commonlisp
gaqwas has quit [Read error: Connection reset by peer]
lisp123 has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
Kyuvi has quit [Ping timeout: 256 seconds]
<Josh_2> I am already using asdf:perform for sbcl's core compression, this calls asdf:output-file which generates a pathname, I was able to modify that
<Josh_2> thanks for your help phoe
<phoe> nice! TIL about that function
john__ has quit [Remote host closed the connection]
<bollu> phoe That doesn't seem to work. Let me try
<bollu> phoe If I launch slime and immediately run (ql:quickload :hoopl) I get System "hoopl" not found [Condition of type QUICKLISP-CLIENT:SYSTEM-NOT-FOUND]
<phoe> bollu: hmmm
<phoe> where is your system located on your hard drive?
<Josh_2> I am upset that asdf does not seem to allow names for versions :(
<phoe> is the path like ~/quicklisp/local-projects/hoopl/hoopl.asd and does it contain a form like (asdf:defsystem #:hoopl ...)?
<Josh_2> This would make something like asdf:version<= impractical
<bollu> phoe the path is like ~/work/hoopl/src/{hoop.asd, hoopl.lisp}
<phoe> bollu: does ASDF know how to look for your ASD file?
<bollu> phoe I have no idea if it does. How would I check that?
<phoe> in particular, is #P"/home/bollu/work/" present in asdf:*central-registry*?
<phoe> if not, you might need to push it there and try again
<bollu> No, I haven't done any such thing
<phoe> try it then!
<bollu> phoe this is distressingly complicated x(
<phoe> bollu: the simple way out is, move your project folder to ~/quicklisp/local-projects/
<bollu> phoe do I need to edit this asdf:*central-registry* each time I load slime?
<phoe> nope, you can put it in your lisp init file to get it to load automatically when you launch slime
<phoe> AFAIR it's ~/.sbclrc for SBCL
<bollu> phoe moving it to that path works, yes
<phoe> good
<phoe> it's the path of least resistance
<bollu> :)
<bollu> quite
cosimone has joined #commonlisp
<lisp123> Configuring ASDF: Create the directory ~/.config/common-lisp/source-registry.conf.d/. Inside this directory, create a file with any filename but with an ending of .conf, for example 50-user-lisp.conf. Within that file, add the following to instruct ASDF to recursively scan all subdirectories within the provided path (replace “/home/user/lisp/” in the below with your chosen folder path): (:tree “/home/user/lisp/“)
<phoe> I actually have all of my lisp stuff in ~/Projects/Lisp/ and it is only loadable because my local-projects is a symlink to this former directory
<phoe> it's dumb but it works!
<phoe> I like dumb stuff that works because I can then understand and fix it
<lisp123> For Windows, paths might be a bit different
<bollu> Now, how do I single step through some code?
<bollu> lisp123 I use Cygwin so the paths works out
<phoe> compile your code with high debug so that it is steppable, then issue STEP on a form, then follow your slime debugger
<phoe> (sb-ext:restrict-compiler-policy 'debug 3 3) and force-recompile your code via (asdf:load-system ... :force t)
<phoe> the restriction will be in effect until you lift it or until you restart Lisp
cosimone` has joined #commonlisp
<bollu> sweet
<bollu> phoe can I get it to enter the debugger for a particular function?
<bollu> or, when a particular sexp is evaluated?
cosimone has quit [Ping timeout: 268 seconds]
<phoe> you don't need to use the stepper for that
<phoe> recompile that function after adding a (break) somewhere in its body
<phoe> and run everything normally
<phoe> you'll end up in the debugger with a restart that allows you to continue
<bollu> fancy
<phoe> and you will have the stack trace available
tyson2 has joined #commonlisp
<phoe> and you will have the REPL also available to execute code from the dynamic context of wherever the code is broken
rgherdt_ has quit [Read error: Connection reset by peer]
<bollu> How do I view values on the stack frame?
<bollu> like, the arguments
<phoe> click a stack frame
<bollu> nice
<bollu> what is the keybind
<bollu> oh, enter
<bollu> xD I kept trying <tab?
<bollu> <tab>*
<bollu> thanks a lot!
<bollu> How do I get a REPL at the stack frame
<phoe> no idea, never used that particular functionality - there's a slime command, slime-eval-in-frame IIRC
<phoe> but I don't think it's possible to move the actual slime REPL to a particular stack frame - unless I'm not aware of that functionality
<bollu> sldb-eval-in-frame is close. It pops up a EVAL> minibuffer
<bollu> I was hoping to get a full REPL to use
rgherdt has joined #commonlisp
wyrd has quit [Quit: leaving]
<yitzi> Its just eval in frame. No REPL
hobo has quit [Quit: ZNC 1.8.2 - https://znc.in]
rain3 has quit [Ping timeout: 240 seconds]
gaqwas has joined #commonlisp
wyrd has joined #commonlisp
<bollu> If I see: There is no applicable method for the generic function #<COMMON-LISP:STANDARD-GENERIC-FUNCTION HOOPL::LATTICE-UNION (2)>
<bollu> and I then define such a method
<bollu> and then hit [RETRY] in the REPL
<bollu> should it not pick up the new method?
<phoe> it should
<phoe> could you paste your code at https://plaster.tymoon.eu/ ?
cosimone` has quit [Ping timeout: 256 seconds]
cosimone` has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
<phoe> also, hmmm, eval-in-frame seems to not work for me with the trivial case of dynavar bindings
<phoe> (defvar *foo* nil) (defun foo () (let ((*foo* :foo)) (break)))(defun bar () (let ((*foo* :bar)) (foo)))(defun baz () (let ((*foo* :baz)) (bar)))(defun quux () (let ((*foo* :quux)) (baz)))(defun fred () (let ((*foo* :fred)) (quux))) (quux)
<phoe> when I move to a respective frame and eval-in-frame *FOO* then I think that I should get the binding from that frame
<phoe> instead I get :FOO every single time
<bollu> phoe I can, but I don't know if it helps, because now the code contains the generic I wanted the REPL to pick up
<bollu> (the generic is (defmethod lattice-union ((x expr-add) (y expr-add))...)
<bollu> the method*
<phoe> if you quit the debugger and reevaluate
<Josh_2> When distributing an sbcl binary that has used core compression the machine executing the binary must have zlib installed?
<phoe> does the GF pick the method up?
<phoe> Josh_2: yes, bundle the zlib shared library with your application
<Josh_2> That sounds like a pita
<bollu> F, good question. It doesn't
<bollu> welp, I am indeed making some mistake :)
<Josh_2> I will tell them to install zlib
<phoe> then it isn't a problem with the debugger
<bollu> mm
<phoe> Josh_2: not really, just build yourself a proper zlib.{so,dll,dylib} and bundle it with your binary
<phoe> oooh, sldb-eval-in-frame seems to be limited to local variables only
<phoe> so it cannot jump between dynamic scopes
<Josh_2> phoe: yeh I have never done that before so it'll be a first time pita
<phoe> Josh_2: Shinmera's deploy should handle bundling zlib
<Josh_2> Yeh but I'm not using deploy
<phoe> at least it did the time I used it
<phoe> oh, welp
<phoe> ;; start doing so!
<Josh_2> I will look into it at some point
xaltsc has quit [Remote host closed the connection]
<Shinmera> using it is adding three lines to your asd that you can (mostly) copy-paste.
<Josh_2> I believe the cookbook has an entry on deploy
<Josh_2> I will look into it
cosimone` has quit [Ping timeout: 268 seconds]
<bollu> how do I create an improper list (1 . 2)?
hobo has joined #commonlisp
<bollu> [without writing (cons 1 2)]
<Shinmera> you just did
<phoe> you can write '(1 . 2) for a literal
<bollu> :)
<bollu> ah I see, I gotta use '
<phoe> obviously
<phoe> anything that looks like a list and that will be evaluated will be treated as a call
<fe[nl]ix> I finished writing the docs of Bordeaux-Threads: https://sionescu.github.io/bordeaux-threads/
<fe[nl]ix> finally :)
<phoe> fe[nl]ix: woah!
<phoe> congrats!
* phoe reads
<phoe> this is all for the first version, right?
<phoe> I ask the question because the top of the page mentions version 0.8.8 but APIv2 is mentioned on the first page
algae has joined #commonlisp
<fe[nl]ix> no, it's for APIv2
<phoe> OK
<bollu> yay, I now have a module and implemented a little bit more
gaqwas has quit [Remote host closed the connection]
<bollu> tomorrow I wrangle with fse
<bollu> fset*
<phoe> fe[nl]ix: where can I submit PRs?
<bollu> Does anyone have an example project that uses quicklisp + fset?
<lisp123> fe[nl]ix: Great design, well done. I was reading the docs of BT a while back, now will revisit
<bollu> so I can see how to write a packages.lisp?
xmyst has joined #commonlisp
mingus has joined #commonlisp
mingus has quit [Ping timeout: 256 seconds]
pve has quit [Quit: leaving]
nij- has left #commonlisp [#commonlisp]
<sm2n> bollu: package(s).lisp is mostly irrelevant to using libraries in CL
<phoe> fe[nl]ix: I love the thread docs so far
<sm2n> in particular, what other languages call packages (i.e units of code that are distributed and built separately) are called systems in CL
<sm2n> CL packages are simply namespaces for symbols
<phoe> might read the other ones tomorrow after I wake up
<sm2n> the de facto build system for CL is called ASDF, and you should have a .asd file in your project to manage dependencies and such
<random-nick> package.lisp usually contains the defpackage forms for your system
<random-nick> the .asd file contains the actual system definition
rogersm has quit [Quit: Leaving...]
<sm2n> ASDF stands for Another System Definition Facility, and manages systems as you might guess
cosimone has joined #commonlisp
<mfiano> Thanks to |3b| we are finally green again across the board: https://github.com/bufferswap/pngload/actions/runs/1671311160
<sm2n> for a quickstart, grab quickproject off quicklisp and let it autogenerate the boilerplate for you
<phoe> mfiano: congrats!
<lisp123> That reminds me, whatever happened to Guest74 - did he/she change his nickname in the end?
<phoe> lisp123: the last mention of the nickname is at https://irclog.tymoon.eu/libera/%23commonlisp?around=1640274104#1640274104
<mfiano> Likely they didn't like IRC. I remember seeing them on Discord crap years ago
<mfiano> as JMC-design
<mfiano> also same name on github
<lisp123> phoe: Ah thanks. Oh well
<lisp123> mfiano: Understood, thanks
<mfiano> Also, for whoever wasn't aware, I made some recent terrible breaking changes to my projects.
<phoe> how terrible?
<mfiano> 1) I consolidated all my non-game engine projects into a mono-repo under github.com/mfiano/common-lisp, so you'll have to add whatever you want tracked to your favorite centralized dependency management solution. 2) I removed all of my game engines from the public, until they are finished or usable, because they haven't been a priority in some time, and I don't want to give any false
<mfiano> impressions.
<mfiano> I did #1 for 2 reasons: It's a pain when I have to help someone pull 10 of my dependencies into local-projects just to use the latest version of one tool that doesn't have the feature in Quicklisp. 2) I am experimenting with other languages, and my github namespace was filling up with short name squats :)
lisp123 has quit [Quit: Leaving...]
<mfiano> Oh quicklisp stopped tracking my stuff a few months ago
<mfiano> Whatever it has is old
<mfiano> So anyone that wants new stuff can put in a request
cage has quit [Quit: rcirc on GNU Emacs 27.1]
wyrd has quit [Quit: leaving]
wyrd has joined #commonlisp
wyrd has quit [Client Quit]
<aeth> interesting how you went the opposite direction that I did
gaqwas has joined #commonlisp
wyrd has joined #commonlisp
wyrd has quit [Client Quit]
<aeth> I originally did everything in what was effectively a monorepo, but I started using different project names because some things will be complete with a few months' effort and some things will never be complete, and expecting someone who downloaded it to know the difference would be asking too much
wyrd has joined #commonlisp
<bollu> can I view users of a library? I want to see folks who use Fset
<bollu> sm2n I'll check out quickproject for next time :D
<phoe> users, as in, people?
<phoe> I think the best you can get is using the "social network" feature of github, like https://github.com/search?l=Common+Lisp&q=depends-on+fset&type=Code
<phoe> but that only gives you repositories and not people who actually use that software
<phoe> ...again, the watch/star lists for repositories are public, sooooo :D
wyrd has quit [Quit: leaving]
<random-nick> I think quickdocs used to list quicklisp systems which depend on a given system
<random-nick> but that's not quite representative as not everything is in quicklisp
Alfr has quit [Remote host closed the connection]
<kevingal> Is there any way to use a setf function without writing it explicitly? Like, if I want to setf 2 different slots, (setf (left obj) ...) and (setf (right obj) ...), can I abstract that to a function that does the setf calls?
Alfr has joined #commonlisp
<phoe> (dolist (writer (list #'(setf left) #'(setf right))) (funcall writer newval obj))
Alfr has quit [Remote host closed the connection]
<phoe> or use (fdefinition `(setf ,name)) for full runtime access
<sm2n> bollu: (ql:who-depends-on :fset)
<kevingal> I didn't know that you could refer to the setf function using #'(setf left), awesooome.
<kevingal> Thank you!
<kevingal> Is there a way to do it just using the name of the slot?
<kevingal> E.g. could I pass the symbol 'left to my function and get it to setf the LEFT slot?
<phoe> (dolist (slot '(left right)) (setf (slot-value instance slot) newval))
perrierjouet has quit [Quit: WeeChat 3.4]
<kevingal> Thanks!!!
<yitzi> bollu: Also quickdocs.org shows dependents
gaqwas has quit [Remote host closed the connection]
<yottabyte> I found it weird I needed to do funcall before a function I passed to another function as an argument
<phoe> yottabyte: hm?
<yottabyte> also, should I do #' instead of ' when passing it? it would be an issue if I had a defvar with the same name as another function?
<phoe> oh, this
perrierjouet has joined #commonlisp
<yottabyte> like (defun something (x f) (f x)) wouldn't work. I would need (funcall f x)
<phoe> yes, that's correct - welcome to lisp-2 which has multiple namespaces
<phoe> including one for variables and another for functionws
<yottabyte> but it's like why? f is a function. why doesn't it just let me do (f x)?
<phoe> (let ((f (lambda () 42))) (flet ((f () 24)) (f)))
<phoe> what should be the result
<phoe> it doesn't matter that F has a function object as a value, it matters that F is accessed in the variable namespace
<phoe> #' grabs a function object from the function namespace and returns it as a value
<phoe> and then you need to operate on it as a value, so FUNCALL
<sm2n> strictly speaking I think funcall is still unnecessary?
<sm2n> if you allow (let ((f (lambda () 42))) (flet ((f () 24)) (#'f)))
<sm2n> but CL doesn't
<pjb> yottabyte: the reason why, is to avoid having to evaluate f at run-time!
<phoe> sm2n: sure, that could work in theory, but CL only allows a (lambda ...) form as a list that can begin a function call
<yottabyte> phoe: I guess 42?
danieli has quit [Ping timeout: 250 seconds]
<phoe> yottabyte: ask your REPL for an answer!
<pjb> yottabyte: by having those two namespaces, we can specify CL so that (f args...) can be compiled without EVALUATING f !
danieli has joined #commonlisp
<phoe> sm2n: there used to be a #, macro that did the inverse of #' - you could do things like (let ((f ...)) (#,f 1 2 3))
<yottabyte> 24 is the right answer. wow
<phoe> and that macro can be portably implemented, even if a little inefficient
<phoe> yottabyte: now try (funcall f)
<yottabyte> 42. so confused
<phoe> in particular, #,f can expand into (lambda (&rest args) (apply f args))
<phoe> and ((lambda (&rest args) (apply f args)) 1 2 3) is a valid function call in CL :D
<sm2n> Ah
<phoe> yottabyte: in one case F refers to the function namespace, in the other case - to the variable namespace
<phoe> thanks to this, we can use variable names like LIST
<yottabyte> ah, I see
blihp has joined #commonlisp
<phoe> and because of this, we are stuck with FUNCALL to avoid confusion
<yottabyte> oooo I was wondering about that
<yottabyte> so I could do like funcall list list or something
rackethelp has joined #commonlisp
<phoe> (let ((list '(1 2 3))) (print list))
<phoe> the tradeoffs of the great lisp-1 versus lisp-2 debate
<phoe> actually has anyone ever proposed a lisp-3/2 to end it once and for all? :(
<yottabyte> I think it's nice
hobo has quit [Quit: ZNC 1.8.2 - https://znc.in]
<yottabyte> having the two different namespaces
rackethelp has quit [Client Quit]
<pjb> phoe: it's not 1 and 2, it's really 1 and ∞.
rackethelp has joined #commonlisp
<phoe> pjb: I was about to write this
<gabc> yottabyte: it's more of a flame war than a debate at this point tho
<phoe> CL is a lisp-n because there's like nine standard namespaces and programmers are free and encouraged to define their own
<gabc> "at this point" might have been in the 90s
<yottabyte> like, packages?
<phoe> that's one namespace
<yottabyte> pjb: what did you mean by avoiding to evaluate f at run-time and (f args...) can be compiled without evaluating f?
<phoe> variables/symbol macros; functions/macros; classes/conditions/types; method combinations; block names; catch tags; tagbody tags; restarts; packages; compiler macros
<phoe> I think that's the standard namespaces
rackethelp has quit [Client Quit]
rackethelp has joined #commonlisp
<rackethelp> Is there a way to annotate functions with polymorphic types?
<rackethelp> (As in, has someone already written such a macro :))
<rackethelp> (I may disconnect but can follow the conversation via the irclogs)
<sm2n> Is there something wrong with declaring the type normally?
<sm2n> the type would just look like (or t1 t2), no?
rackethelp has quit [Quit: Client closed]
rackethelp has joined #commonlisp
wyrd has joined #commonlisp
<rackethelp> does that work if I want to write a type for a function from List a  to List a?
<rackethelp> Like, I want to make sure that the contents of the list always have the same type
<sm2n> Oh, ...I don't think that's possible?
<rackethelp> oh, okay, that's fine-- i was just wondering
<rackethelp> thanks!
rackethelp has quit [Client Quit]
rackethelp has joined #commonlisp
thomaslewis has joined #commonlisp
Guest74 has joined #commonlisp
Algernon69 has joined #commonlisp
Algernon91 has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
<Bike> no, there are no universally quantified types.
<phoe> ;; try coalton though
Oladon has joined #commonlisp
Algernon69 has quit [Ping timeout: 240 seconds]
gaqwas has joined #commonlisp
varjag has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
thomaslewis has joined #commonlisp
<pjb> yottabyte: indeed, f can be determined at compilation time, according to the rules of CL.
thomaslewis has left #commonlisp [#commonlisp]
<pjb> yottabyte: 1- if the definition of f is in the same compilation-unit as the call to f, and if f is not declared notinline, or if it's declared inline, then the compiler doesn't need to go thru the symbol f at run-time, it can hardwire the address of the function in the JSR.
mingus has joined #commonlisp
<pjb> and there's no 2-.
<yottabyte> Interesting
<pjb> yottabyte: note also, that when we must go thru the symbol (fdefinition 'f), this can be done before or after the evaluation of the arguments, since it's not considered an evaluation.
<pjb> yottabyte: so: (defun f (&rest args) 'before) (declaim (notinline f)) (f (defun f (&rest args) 'after)) can return BEFORE or AFTER.
<phoe> the reason for what pjb is describing now is that resolving function names, no matter if it's for (foo ...) or for #'foo, needs only the lexical environment to do its work - either a function is named locally via FLET or LABELS, and that's apparent in the lexical environment and therefore can be hardwired, or it's not - so it must name a global function, and the global environment is always present
<phoe> there's no need to evaluate anything, just inspect the environment to figure out where you gotta grab your fdefinition from
mingus has quit [Ping timeout: 256 seconds]
xmyst has quit [Ping timeout: 240 seconds]
blihp has quit [Quit: Leaving]
jstoddard_ has joined #commonlisp
jstoddard has quit [Read error: Connection reset by peer]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
jstoddard_ is now known as jstoddard
gaqwas has quit [Remote host closed the connection]
hobo has joined #commonlisp
Algernon91 has quit [Read error: Connection reset by peer]
rackethelp has quit [Quit: Client closed]
rackethelp has joined #commonlisp
rackethelp has quit [Client Quit]
hobo has quit [Quit: ZNC 1.8.2 - https://znc.in]
gaqwas has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
waleee has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
joast has joined #commonlisp
rgherdt has quit [Ping timeout: 240 seconds]