phoe 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/>
alvaro121 has quit [Quit: Bye]
<etimmons> Shinmera: trivial gray streams has file-position, and I'm pretty sure it works on most implementations
dra_ has joined #commonlisp
dra has quit [Ping timeout: 268 seconds]
contrapunctus_ is now known as contrapunctus
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
mgl has quit [Ping timeout: 256 seconds]
pve has quit [Quit: leaving]
Bike has quit [Quit: Connection closed]
dre has joined #commonlisp
tyson2 has joined #commonlisp
alvaro121 has joined #commonlisp
Bike has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
epony has quit [Ping timeout: 240 seconds]
ec has joined #commonlisp
dra_ has quit [Remote host closed the connection]
pranavats has left #commonlisp [Error from remote client]
s-liao has joined #commonlisp
random-nick has quit [Ping timeout: 240 seconds]
alvaro121 has quit [Remote host closed the connection]
pranavats has joined #commonlisp
epony has joined #commonlisp
alvaro121 has joined #commonlisp
aeth has quit [Ping timeout: 250 seconds]
<Guest74> is there a way to add/view documentation for a specific method of a generic function?
aeth has joined #commonlisp
<mfiano> ,clhs documentation
<mfiano> clhs documentation
lispy has quit [Remote host closed the connection]
<dbotton> if there a popular library for doing text templates? I am looking to generate "scaffolding" for projects, ie. an asdf file, some basic lisp files, etc. much of which a simple replace of some symbol would do.
<EdLangley[m]> Why not use `?
<Guest74> mfiano: that doesn't explain it to me.  do you have an example?
<White_Flame> it would be nice if backquoted forms could be passed around, but they can't. You could use a macro for an active template
<mfiano> Guest74: It's there as plain as can be. Look at the method methods
<Guest74> it's not plain to me or I wouldn't be asking.  do you have an example?
<mfiano> documentation (x standard-method) (doc-type (eql 't))
<mfiano> (setf documentation) new-value (x standard-method) (doc-type (eql 't))
<dbotton> The idea is to have a set of files and just replace some text in each and write them out to some directory
<Guest74> I don't see how typing out exactly what the page says is any help when I said I don't understand what is on the page.
lispy has joined #commonlisp
<Guest74> that is not lisp.
<mfiano> Common Lisp is a class-based language. If you don't know the function for getting a method instance, it is find-method
<EdLangley[m]> Guest74: (describe #’foo) might show documentation for the function’s methods
<mfiano> I'm sorry, but I can't write code for you right now. Those are the signatures you need.
<EdLangley[m]> I’m not at my laptop at the moment, and the details here are implementation-dependent
<White_Flame> dbotton: here's a functional, short, but janky way of using backquotes: https://plaster.tymoon.eu/view/2898#2898
pieguy128 has quit [Ping timeout: 240 seconds]
<EdLangley[m]> Yeah, if you’re just generating lisp source, I’d use backquotes and pprint
alvaro121 has quit [Quit: Bye]
<Guest74> Ed: I'd have to add the documentation to see if describe shows it :)
<White_Flame> there's really no difference in having that sort of literal backquoted form, and a macro body I guess
<dbotton> My question is more about file processing White_Flame
<White_Flame> could comma out to any lisp form
<EdLangley[m]> So, you do (setf (documentation …) “doc”) go set documentation.
<EdLangley[m]> dbotton: I’ve used cl-mustache before
<EdLangley[m]> But, if you’re generating lisp source it’d be better to take advantage of lisp’s builtin templating mechanisms.
<Guest74> ed: that doesn't explain how to set documentation for a specific method.
<EdLangley[m]> (let ((*print-case* :downcase)) (pprint `(asdf:defsystem ,name . . .) *file-stream*))
<EdLangley[m]> Use find-method to find the method and then read clhs to find that info
<mfiano> Retrieve the method with find-method and operate on that!
<EdLangley[m]> Or, just use docstrings
pieguy128 has joined #commonlisp
<Guest74> sheesh ask a simple question.
Bike has quit [Quit: Connection closed]
Bike has joined #commonlisp
lispy has quit [Quit: O/]
igemnace has joined #commonlisp
<Josh_2> Guest74: when are you going to get a real name?
<mfiano> Oh is that that guest that nobody knows if they are a newbie or not?
<mfiano> I was about to direct them to #clschool. I can't remember all the guests that come here.
<Guest74> aren't you guys nice.  Well done.
lispy has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
lispy has quit [Quit: O/]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
Bike has quit [Quit: Connection closed]
<dbotton> Is there a simple tutorial on presentations in CLIM/McCLIM around? Something very practical?
<beach> dbotton: I believe I wrote one. It should be in the McCLIM documentation.
<beach> dbotton: You might also join the #clim channel.
<beach> dbotton: But most participants are probably still asleep, and jackdaniel is not quite well yet, perhaps.
alvaro121 has joined #commonlisp
<mfiano> He is getting better he said.
<beach> Excellent.
<mfiano> beach: Have you read Keene's book?
<beach> Oh, and: Good morning everyone!
<dbotton> What happened?
<beach> mfiano: Yes.
<beach> dbotton: COVID.
<dbotton> :( no fun, been there
<mfiano> beach: Do you think it is worth reading for an experienced Common Lisper? I am getting the vibe that it was Symbolics marketing for what OOP should be, and I'm unsure if I would learn anything from it.,
* mfiano noticed it is one of few Lisp books on his bookshelf he hasn't yet read.
<beach> If you already use CLOS, then probably no. And I didn't much like the book, mainly because the (in my opinion) badly chosen examples.
<mfiano> I see. Thanks.
edmrk[m] has quit [K-Lined]
opalvaults[m] has quit [K-Lined]
Charles[m]1 has quit [K-Lined]
seragold[m] has quit [K-Lined]
kakuhen has quit [K-Lined]
linjian has quit [K-Lined]
zbrown[m] has quit [K-Lined]
sepanko has quit [K-Lined]
Spawns_Carpet[m] has quit [K-Lined]
Mrtn[m] has quit [K-Lined]
nworb has quit [K-Lined]
prov[m] has quit [K-Lined]
Duuqnd has quit [K-Lined]
Gnuxie has quit [K-Lined]
miique has quit [K-Lined]
yitzi has quit [K-Lined]
luis` has quit [K-Lined]
katco has quit [K-Lined]
sp has quit [K-Lined]
loke[m] has quit [K-Lined]
EdLangley[m] has quit [K-Lined]
Arcsech has quit [K-Lined]
dieggsy has quit [K-Lined]
CodeBitCookie[m] has quit [K-Lined]
akater[m] has quit [K-Lined]
saltrocklamp[m] has quit [K-Lined]
<beach> mfiano: I read the Keene book and didn't understand much of how to use CLOS. Then I read the CLIM II specification, and I understood a lot more.
<beach> The concept of a protocol became much clearer to me then.
<Josh_2> Guest74: you should pick a cool name like dragon
<mfiano> I see. I have not much interest in graphical interfaces, or graphical environments for that matter, so I am unsure if I could stomach it. I prefer working at a terminal.
<Josh_2> I read the Keene book, it helped me understand CLOS
<beach> mfiano: I understand.
<beach> Josh_2: Sure, it is not completely worthless. It does contain the basics of CLOS. But I suspect mfiano already knows that much.
<Josh_2> I did not, so I found it helpful
<beach> Yeah, sure.
<mfiano> I do know quite a bit of CLOS and the MOP already, but I think there needs to be more books on practical applications of them.
waleee has quit [Ping timeout: 240 seconds]
<beach> I totally agree. I have some partially finished books, but every book project is stalled now.
<mfiano> I think AMOP was a terrible techical book (like most of them). It could have used a couple dozen more copy editors and maybe a typesetter or 3.
<beach> Yes, the organization is bad.
<Josh_2> A dozen more practical examples would have been most useful for me
<mfiano> AMOP was pretty painful to read because of my attention to detail. I had to ask a lot of questions when the book was plain wrong or contradicted itself in various places.
<beach> My book projects depend on having a coauthor to take care of the copy editing, precise organization, LaTeX details, etc. But my favorite coauthor essentially abandoned me. Then phoe was going to help me with one of my books, but then got very busy with lots of other stuff.
<beach> mfiano: I started it twice without finishing. It was only on my third attempt that I managed to read to the end. And that was after learning a lot more of CLOS from the CLIM specification.
<beach> dre: Please don't post links without an explanation of what we can expect if we follow them.
<mfiano> Who is your favorite coauthor? I take it that is an abbreviation to auto-complete, but it is slightly annoying we never know who that is :)
<dre> a fun music video on a bad book :)
<dre> (not bad in my taste but not for everyone)
<beach> mfiano: Oh, "everybody" knows. Her name is Irène Durand, and sometimes comes here as idurand.
<mfiano> Oh yes I recall the name.
<beach> mfiano: She is the only coauthor on my papers and books. So it is not hard to be the favorite one. :)
<mfiano> phoe is currently very busy writing the second edition of Edmund's book.
<moon-child> 'granddaddy of all lisp dialects' not lisp 1.5?
* moon-child would read a book on how to make games with lisp 1.5
<beach> mfiano: Exactly.
<mfiano> That book is quite a tome, so I expect him to be busy for a long while.
<beach> mfiano: And I can already tell that he is essentially never going to be available, so I gave up on him.
<mfiano> I think that is accurate. phoe is doing amazing work for the community, but he moves around a lot.
<beach> Exactly.
<beach> My favorite coauthor was perfect. She knows her domain very well. She is meticulous and hard working. And she lives not too far from me, so we can easily meet. But she has changed her priorities of how she likes to spend her time.
<beach> She if French, but she lived 2 years in the US so her English is quite good.
akoana has quit [Quit: leaving]
<beach> There is very little hope to match her.
<moon-child> mfiano: waitaminit, if you don't like graphical environments, why are you writing a colour library?
<moon-child> need perfectly graded syntax highlighting? :)
<mfiano> moon-child: That is a good question. I don't like using a graphical interface. Most computing tasks can be done perfectly fine with a command line interface. However, just because I like algorithmic art and generating imagery, doesn't mean I have to use the mouse or interact with GUI widgets.
<moon-child> I see
<beach> mfiano: CLIM is perfect then. It even has a command-line interface almost by default.
<moon-child> I do think that mice are ergonomic disasters, and widgets are not great
<moon-child> however
<moon-child> I think there are myriad opportunities to take advantage of graphical organization for better presentation of information
<moon-child> see e.g. cantordust
<mfiano> Not just ergonomic disasters, but everytime I have to take my fingers off the keyboard to reach for the mouse, usually means I'm switching to some other context, which is a huge productivity disaster, and even a few milliseconds can disrupt "flow".
<mfiano> My workflow is entirely keyboard oriented, except for very few tasks that are unavoidable.
<moon-child> I see
<moon-child> to me, the problem is not switching. The problem is that mice are generally used to choose from among discrete objects and perform discrete actions, a task to which (as analogue instruments) they are not well suited
<mfiano> I also tend to try to keep a similar working environment across all my hardware, some virtual/remote even.
<mfiano> I have a lot of machines I work on.
<moon-child> same. Well, I probably do not have quite so many as you :P
semz_ has joined #commonlisp
semz has quit [Ping timeout: 250 seconds]
Bike has joined #commonlisp
Bike has quit [Quit: Connection closed]
Bike has joined #commonlisp
luis` has joined #commonlisp
edmrk[m] has joined #commonlisp
sepanko has joined #commonlisp
EdLangley[m] has joined #commonlisp
dieggsy has joined #commonlisp
akater[m] has joined #commonlisp
Mrtn[m] has joined #commonlisp
saltrocklamp[m] has joined #commonlisp
Gnuxie has joined #commonlisp
nworb has joined #commonlisp
yitzi has joined #commonlisp
sp has joined #commonlisp
CodeBitCookie[m] has joined #commonlisp
loke[m] has joined #commonlisp
char[m] has joined #commonlisp
seragold[m] has joined #commonlisp
Spawns_Carpet[m] has joined #commonlisp
zbrown[m] has joined #commonlisp
miique has joined #commonlisp
opalvaults[m] has joined #commonlisp
linjian has joined #commonlisp
Arcsech has joined #commonlisp
prov[m] has joined #commonlisp
kakuhen has joined #commonlisp
Duuqnd has joined #commonlisp
dre has quit [Ping timeout: 250 seconds]
saltrocklamp[m] has quit [Quit: Client limit exceeded: 20000]
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
tyson2 has quit [Remote host closed the connection]
s-liao has joined #commonlisp
dre has joined #commonlisp
Bike has quit [Quit: Connection closed]
igemnace has quit [Remote host closed the connection]
Everything has joined #commonlisp
Jing has joined #commonlisp
s-liao has quit [Quit: Client closed]
Jing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Everything has quit [Quit: leaving]
Algernon69 has joined #commonlisp
Algernon69 has quit [Ping timeout: 245 seconds]
aartaka has joined #commonlisp
<jeosol> mfiano: I can attest to keep similar environment across machines - i run the same linux distro on my two working machines (one for dev and other for testing) - tend to upgrade OS similarly and compiler updates like SBCL. it makes for less surprises and issues
katco has joined #commonlisp
saltrocklamp[m] has joined #commonlisp
<jeosol> beach: are you writing several books, trying to understand from the earlier comments
<beach> Let's say I have several book projects in various degrees of completion.
<jeosol> beach: changed her prorities of how she likes to spend her time .... meaning she change areas of focus and interest?
<jeosol> beach: are they on your metamodular(?) site ?
<beach> Exactly. Especially when it comes to activities outside paid day job.
<jeosol> I see
<beach> No, they are not. I was hoping to make some money out of some of them.
<jeosol> they are CL focus? programming  language, compilers?
<beach> All of the above. :)
<jeosol> is there a lot of money in publishing these days? I don't know and asking genuinely. I guess it depends on the area of focus
<jeosol> beach: very nice
<beach> Plus software engineering, operating systems, algorithms and data structures.
<jeosol> I believe a lot of people can benefit from using CL but they get bugged down with emacs and parentheses issues
<beach> jeosol: I have a book "Introduction to Computer Science" self published through Amazon, and I make around 2€ per month.
<jeosol> beach: very nice, I eventually worked through the algorithms and DS refreshers I was taking a while back. Finally the graphs and doing some dynamic programming.
<jeosol> I will be giving the CL graph libraries a look in a few weeks to see what they have
<jeosol> Introduction to Computer Science -- very nice
<beach> I see. About half of the books on algorithms and data structures are so bad that the authors should be spanked.
<jeosol> hahahaha
<beach> They can't even get binary search right.
<jeosol> binary search with the issue of computing the mid, remember seeing issues with that overflow or when high and low are very large
<jeosol> (mid + low) // 2 vs low + (high-low) // 2 or something like that
<jeosol> I don't recall the details
<jeosol> beach: i take it you are aware of the CL book on algorithms, forgot the guys name, from Ukraine I think? vsevelod? or something like that
<beach> Well, that one is fairly easy to fix. The main problem is that half the books start by testing for equality, thereby making the overall algorithm half the speed as it should be.
<beach> Yes, I reviewed early drafts of it.
<jeosol> Interesting point, I was looking at that lately, I see yesterday, don't recall it was wiki, or somewhere, the equality was put at the end
<Shinmera> etimmons: Ah, right, but not file-length.
<jeosol> *equality test
<beach> jeosol: That's the right place. Some books get it right.
<beach> There should be only one comparison per iteration.
<jeosol> Makes a lot of sense. One branch test for going left or right , and when R=L, break out of the loop andd check if A[L] == Target, and return T or nil
<beach> Exactly.
<jeosol> does that sound like what you alluded to
<jeosol> oh ok
<beach> And not even people who claim to be world experts get it right.
<jeosol> It definitely will be faster, I agree
<beach> Very disappointing.
<jeosol> good point, juggled my brain
<beach> The situation is similar with the literature on operating systems.
<beach> Tanenbaum and Bos claim that it is impossible to write an operating system in a language with automatic memory management, just to take one example.
<jeosol> these kind of small things can result in huge savings and wins
<beach> jeosol: For binary search, it's a factor 2.
<jeosol> wow, that's insane
<beach> That's why I feel compelled to write better books. But then, like I said, the projects are stalled.
<beach> Other authors of OS books haven't even bothered reading up on history.
<jeosol> That's a good goal indeed and lofty one.
<beach> Thanks. I can come up with the general contents, but I don't have the time or the energy with all the details, hence the need for a meticulous coauthor.
<jeosol> I am not an OS guy/person, and a bit closer to the algorithms side of things
<beach> I see.
semz_ is now known as semz
<jeosol> I was reading a book on computer architecture to understand things better
<jeosol> * I am rather ... still working through it
<beach> Oh, right, we have one about architecture published in French. That one also gives a few € per year.
<jeosol> is CL central to all the books?
<beach> The book entitled "Concrete and abstract data types" hides Common Lisp in that it translates it to an algorithmic language. But I consider just using Common Lisp, because the additional work to check the code required my favorite coauthor.
<beach> But, sure, I try to slide in some Common Lisp information everywhere if I can.
<beach> The book on operating systems mainly corrects the incorrect history of other books, and laments the fact that we still use derivatives of UNIX, even though the UNIX execution model exists because of the limitations on very small and very simple hardware.
<jeosol> beach: thank you for the background info
<beach> Pleasure.
<jeosol> Sounds Irene is very meticulous
<beach> Indeed.
<jeosol> My adviser in school used the word pendantic, when I first turned in some plots and not analysing all the behavior, since then I remember that word and always double check and triple check things ...
<beach> Heh.
aartaka has quit [Ping timeout: 250 seconds]
lisp123 has joined #commonlisp
aartaka has joined #commonlisp
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
Fare has quit [Ping timeout: 256 seconds]
lisp123 has quit [Remote host closed the connection]
occ has quit [Ping timeout: 256 seconds]
occ has joined #commonlisp
wyrd has quit [Ping timeout: 276 seconds]
aeth has quit [Ping timeout: 240 seconds]
aeth has joined #commonlisp
opalvaults[m] has quit [Quit: Client limit exceeded: 20000]
Gnuxie has quit [Quit: Client limit exceeded: 20000]
<pjb> Note that in CL, (truncate (+ low high) 2) is as good as (+ low (truncate (- high low) 2)). The only case where it may make a difference is if you go out-of-memory upon the bignum sum, (but then you'd probably go out-of-memory on the difference as well).
Gnuxie has joined #commonlisp
opalvaults[m] has joined #commonlisp
<pjb> The problem is indeed, that most people don't program in their programming language, but instead program in an imagined language that ressemble their programming language.
pve has joined #commonlisp
<pjb> Look at how beach strive to give more meaning to operators, so that (if a b) => (when a b) ; (return (when a b)) => (return (if a b nil)) etc… It doesn't matter if you write in CL, but it matters if you try to write in a imaginary language ressembling CL. And the problem is that you need to be able to read CL anyway, or else…
<moon-child> eh, I would expect the difference code to be slightly faster. And, given high>low (presumably...), less likely to cons. It would never cons in the common case when high and low are array indices and fixnums
<moon-child> and the difference code is clearer in some respects, imo. 'Start at low, and go halfway towards high.' Vector basically
<phoe> beach: mfiano: yes, that's correct. :( Apologies.
<beach> phoe: Nothing to apologize for. Just stating a fact.
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
<pjb> moon-child: (low+high)/2 is clear too: go halfway between low and hig.
attila_lendvai has joined #commonlisp
spacebat4 is now known as spacebat
akoana has joined #commonlisp
s-liao has joined #commonlisp
mon_aaraj has quit [Ping timeout: 260 seconds]
mon_aaraj has joined #commonlisp
shka has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
cage has joined #commonlisp
Algernon69 has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
Lord_of_Life_ has joined #commonlisp
Algernon69 has quit [Ping timeout: 245 seconds]
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life_ is now known as Lord_of_Life
s-liao has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
<phoe> minion: memo for Bike: I think this sort of snippet can work as some basic FBIND test, https://plaster.tymoon.eu/view/2899#2899 - Serapeum's FBIND obviously fails the identity comparison because it makes an intermediate function
<minion> Remembered. I'll tell Bike when he/she/it next speaks.
<minion> Remembered. I'll tell Bike when he/she/it next speaks.
<phoe> minion: memo for Bike: I'll try to make an implementation that fulfills that test in a spare while
Dynom has joined #commonlisp
akoana has quit [Ping timeout: 256 seconds]
s-liao has quit [Ping timeout: 256 seconds]
igemnace has joined #commonlisp
s-liao has joined #commonlisp
Devon has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
pingpongball has joined #commonlisp
<pingpongball> In this function
<pingpongball> (defun print-list (list)
<pingpongball>   (dolist (i list)
<pingpongball>   (format t "item: ~a~%" i)))
<pingpongball> why we call this function with?
<pingpongball> `(print-list '(1 2 3))`
<pingpongball> and why not `(print-list (1 2 3))`
<phoe> pingpongball: because (1 2 3) is a function call
<phoe> except that 1 is not a valid function name
<phoe> you need (print-list (quote (1 2 3))) because QUOTE returns its argument unevaluated
<phoe> and (quote (1 2 3)) has its own syntax in CL, '(1 2 3)
<phoe> ;;you might to enjoy joining #clschool for questions about CL basics, too!
<pingpongball> yes right,
<pingpongball> oh thanks :)
<pjb> pingpongball: And there's no need to copyu the same question in all channels. The OR wasn't really an inclusive OR, but one where you select the channel best adapted to your question! http://cliki.net/IRC
<pingpongball> Oh sorry, i'll not :)
<Devon> (print-list (list 1 2 3)) is ok
perrierjouet has joined #commonlisp
random-nick has joined #commonlisp
dlowe has joined #commonlisp
dlowe has quit [Remote host closed the connection]
dlowe has joined #commonlisp
pingpongball has quit [Quit: "see you later :)"]
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.4]
mon_aaraj has quit [Quit: WeeChat 3.4]
mon_aaraj has joined #commonlisp
dlowe has quit [Remote host closed the connection]
dlowe has joined #commonlisp
dlowe has quit [Remote host closed the connection]
Jing has joined #commonlisp
dlowe has joined #commonlisp
dlowe has quit [Remote host closed the connection]
mon_aaraj has quit [Ping timeout: 250 seconds]
mon_aaraj has joined #commonlisp
dlowe has joined #commonlisp
dlowe has quit [Read error: Connection reset by peer]
dlowe has joined #commonlisp
lisp123 has joined #commonlisp
dlowe has quit [Read error: Connection reset by peer]
dlowe has joined #commonlisp
dlowe has quit [Remote host closed the connection]
mon_aaraj has quit [Ping timeout: 250 seconds]
raeda has quit [Ping timeout: 260 seconds]
lisp123 has quit [Remote host closed the connection]
Rue has joined #commonlisp
dlowe has joined #commonlisp
raeda has joined #commonlisp
domovod has joined #commonlisp
tyson2 has joined #commonlisp
notzmv has quit [Ping timeout: 240 seconds]
s-liao has quit [Quit: Client closed]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 260 seconds]
perrierjouet has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #commonlisp
igemnace has quit [Remote host closed the connection]
s-liao has joined #commonlisp
Bike has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.4]
jealousmonk has joined #commonlisp
psf has quit [Ping timeout: 250 seconds]
psf has joined #commonlisp
Fare has joined #commonlisp
pingpongall has joined #commonlisp
pingpongall has quit [Client Quit]
<Devon> Anybody here use SLY? ELPA [Install] hangs with the message Contacting host: elpa.nongnu.org:443
tane has joined #commonlisp
blacked has joined #commonlisp
pingpongball has joined #commonlisp
gjvc has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
citizenajb has joined #commonlisp
<jealousmonk> Devon: What is your Emacs version?
<Guest74> I wonder if I can get any thoughts on this. https://github.com/JMC-design/surface/blob/master/surface.lisp
Algernon69 has joined #commonlisp
<Guest74> What's missing, what shouldn't be there.  some basic documentation is in documentation.lisp
treflip has joined #commonlisp
<blacked> :D
Algernon69 has quit [Ping timeout: 252 seconds]
<Bike> usually for (find :linux *features*) you'd just do it at readtime, since you're probably not going to change OS at runtime
<minion> Bike, memo from phoe: I think this sort of snippet can work as some basic FBIND test, https://plaster.tymoon.eu/view/2899#2899 - Serapeum's FBIND obviously fails the identity comparison because it makes an intermediate function
<minion> Bike, memo from phoe: I'll try to make an implementation that fulfills that test in a spare while
aartaka has quit [Ping timeout: 245 seconds]
<phoe> Bike: the only issue I've ended up with is that I am puzzled by the current choice of code walkers and their abilities and state of documentation
<phoe> so let me scratch my head for a while
pingpongball has quit [Quit: Client closed]
<Bike> code walking just seems inherently unreliable to me.
<Xach> Guest74: if i were making it, I'd make CREATE a GF and EQL-specialize on TYPE.
notzmv has joined #commonlisp
mmk2410 has quit [Ping timeout: 250 seconds]
<Bike> though i haven't looked at how agnostic lizard works. i remember raskin saying it was supposed to deal with a lot of the issues.
<Guest74> bike: isn't it possible you'd compile on one computer and ship the binary to someone on another computer?
<phoe> Guest74: they will be running the same OS though
mmk2410 has joined #commonlisp
<etimmons> Unless you're shipping with ABCL
<phoe> in general a Lisp program cannot be cross-compiled, I don't know of an implemnetation that allows----
<Guest74> oh, right, since binary.
<phoe> etimmons: touché
<phoe> ABCL is the one where that is possible
<Guest74> Xach: the problem with that is that it uses the default for the environment when no type is supplied.
<Xach> Guest74: sure. then i would have (eql t) or (eql nil) mean "use the default.
<Xach> probably (eql t).
<Guest74> but you would then have to supply something true, no?
<Bike> or you could do the two layer thing where CREATE is like there except it immediately calls CREATE-GF
aartaka has joined #commonlisp
<phoe> ^
<Xach> Guest74: you would supply the the symbol T
<Xach> (let ((surface (create t))) ...)
<Xach> Yeah, or something like (find-constructor type ...) as a GF
<Xach> Lots of options.
<Xach> I'm expressing a personal preference, a defun isn't wrong, but if you are making a GF protocol, I would put CREATE under its umbrella.
<Guest74> Yeah, I just went with the simplest at this stage.  The backends also have the same methods implemented as normal functions.
<Bike> phoe: but yeah, the test makes sense.
<Guest74> but i'm still thinking about the whole surface:create thing.
<phoe> Bike: the only two options are see are code walking or implementation support, and both of them are going to be terrible to implement
<Guest74> it just makes it easier that I can just copy/paste (the horrors) create into the backends for when people don't want to use the generic functions.  But I guess I could wrap it in a GF.
<Bike> phoe: such are language extensions.......................
aartaka has quit [Ping timeout: 250 seconds]
morganw has joined #commonlisp
aartaka has joined #commonlisp
<phoe> macroexpand-dammit does not seem to have the functionalities I need, trivial-macroexpand-all is even simpler, agnostic-lizard is not really documented, and hu.dwim.walker is written in hu.dwim.common-lisp rather than CL *AND* has even less documentation than agnostic-lizard
jealousmonk has quit [Changing host]
jealousmonk has joined #commonlisp
<phoe> and going the other way effectively requires adding a new special form to eight distinct compilers, two of which are closed-source
<phoe> that's a lot of effort™
Fare has quit [Ping timeout: 256 seconds]
<Guest74> Wondering if create should have WIDTH and HEIGHT as required parameters.  Since resizing of some surfaces can be seen as expensive.
<Guest74> TIL you can't do (eql nil) in a method.
<attila_lendvai> phoe, hu.dwim.walker has loads of test, though.
<Xach> Guest74: yes you can.
<phoe> attila_lendvai: yes, that's a poor man's documentation - I'm trying to dig into it right now
<attila_lendvai> and a non-trivial use in the form of hu.dwim.reiterate (which is sadly only 80% finished)
<Guest74> Xach: do you have an example?  I just tried and it told me no such class, while T worked fine.
<phoe> my main problem is passing information in the walker's lexical environment - something that I'd solve with SYMBOL-MACROLET if I were writing macros
<phoe> or by rebinding a dynamic variable if I were doing recursion
<attila_lendvai> phoe, hu.dwim.walker has its own env class. it shouldn't be too hard to customize it, esecially with the use of contextl
* attila_lendvai looks
<Xach> Guest74: (defmethod foo ((bar (eql nil))) (list bar))
<Bike> oh, it uses contextl? interesting.
<Guest74> nevermind, i'm an idiot
<Guest74> oops, too late.
<phoe> how do I access that environment object? it doesn't seem like REWRITE-AST's visitor function accepts it as an argument
<phoe> Xach: (bar null) even, no need to use an EQL specializer in that particular case
<attila_lendvai> phoe, see infrastructure.lisp, sadly walk-environment is a struct for some reason, not a class. you'd need to dig into the walker's code to customize it.
<phoe> ouch
<attila_lendvai> phoe, doesn't seem to be too hard. that struct is internal to the lib, so the API wouldn't change
<phoe> I wonder if I can do structure inheritance and somehow tell the walker to use the new class
<Guest74> phoe: nice to know.  Unfortunately both still require a nil to be supplied.  I should perhaps get over my laziness.
<phoe> ...nope, it won't work, there's COPY-WALK-ENVIRONMENT and MAKE-WALK-ENVIRONMENT all over the place that won't mesh well with superstructures
<attila_lendvai> phoe, if you decide to rewrite it to use a class instead of a struct then i'll merge the change. i have nothing against it.
<attila_lendvai> i have no idea why i chose to use a struct there
<phoe> I have no idea if I can do that easily - I'll need to learn some of that DEF magic before I become able to work with that codebase
<phoe> and then I'll need to make the class customizable in some way
<attila_lendvai> phoe, def is a very trivial layer. the only magic is the char based Export/Inline/export-Accessors, etc. if you keep nagging me about it, i may give it a go myself sometime. not messing much with CL nowadays, though.
<phoe> well - I'd like to have a portable FBIND that preserves function identity, and I'll certainly need a walker for that
<phoe> and I want to have such a FBIND in other to put it as a recipe in a new edition of a popular Common LIsp book
<phoe> so I hope you know what you're getting into if you give me the permission to keep on nagging you
* phoe reads up about def in meantime
<attila_lendvai> phoe, heh... in that case i may end up giving you the commit bit to the hu.dwim universe... :)
<phoe> :O
* phoe is unsure if he's worthy of such responsibility
<phoe> that would be, like, the ultimate yak shave - I start with a portable FBIND implementation and end up being a hu.dwim co-maintainer
Algernon69 has joined #commonlisp
<attila_lendvai> phoe, :D
citizenajb has quit [Ping timeout: 256 seconds]
<attila_lendvai> well, i could use a hand, it's a one bus project. if i got taken by the police then the hu.dwim codebase would inevitably bitrot...
Algernon91 has joined #commonlisp
<phoe> attila_lendvai: truth be told, I'd change the deal a little bit - I'll accept the offer, but I'll also want to nag you with questions related to "what is this thing, what does it do, why is it there"
<phoe> so I can fill in the blanks in that universe, such as user manual and documentation and architecture docs and examples
<attila_lendvai> phoe, feel free to nag me whenever i'm around, or even on github issues as appropriate
<attila_lendvai> phoe, the hu.dwim stuff is really not as much as people think. it's probably the fact that the hu.dwim.def thin syntax layer is everywhere, and it gives the impression that it's something very alien. it's just a bunch of libs that use a few extra constructs, like the def macro.
Algernon69 has quit [Ping timeout: 250 seconds]
blacked has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
varjag has joined #commonlisp
<phoe> attila_lendvai: OK, that works
<phoe> I'll need some general information about the walker architecture, i think I can figure the DEF on my own
<phoe> (now that I know what the E I EA things mean in definitions)
<phoe> attila_lendvai: think you can write something down regarding how the walker's data structures are frobbed during walking and how the walk-environment object is used throughout the walking process and how it can be accessed from the outside right now? I'll try to ask questions based on that
akoana has joined #commonlisp
<attila_lendvai> phoe, but are there any suprises there? hdw defines its own type for the lexenv (i.e. walk env), which is very much like the impl's lexenv, only some info is extracted from the impl-specific env into the hdw env. and this env is available through the -environment- variable inside the form handlers.
<attila_lendvai> phoe, -foo- is naming convention for lexically bound implicit variables. and layered-method's are used for the walker methods for extra customizability.
dlowe has quit [Remote host closed the connection]
Fare has joined #commonlisp
aartaka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
<phoe> OK, I assume that works - the naming convention also puzzled me a little bit
<phoe> and I'll need to grok contextl and layered methods
<mfiano> phoe: There's nothing wrong with that. It wasn't meant to be offensive :)
<phoe> mfiano: I know, I'm just personally feeling bad about it
<phoe> too much to be done, too few hours on the clock :(
<mfiano> Yes very much agree :(
cosimone has joined #commonlisp
perrierjouet has joined #commonlisp
<attila_lendvai> phoe, layered methods are just a defmethod with an extra, implicit object, the context, to which you can add and remove classes
pranavats has joined #commonlisp
<Guest74> is there some convention for conditionally defining a method depending on whether a certain system/package is available?  I'd like to be able to support all the various colour format libraries out there without loading every single library on a users computer.
perro_ has joined #commonlisp
<phoe> attila_lendvai: thanks, I'll grok it
MajorBiscuit has joined #commonlisp
<Guest74> or is it even possible? I tried a toplevel (when (find-package 'some)(defmethod something((thing some:thing))... and it barfs on package not found.
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
<pjb> Guest74: At read-time: #+#.(cl:if (cl:find-package 'some) '(:and) '(:or)) (defmethod something((thing some:thing))... and)
<pjb> Guest74: At run-time: (when (find-package 'some) (eval (read-from-string "(defmethod something ((thing some:thing))...)")))
<Guest74> oh, i thought that was only for features, or that was the impression I got from clhs.
dra has joined #commonlisp
<pjb> Guest74: an alternative is to also define the package in your system, and test in the method, at run-time whether the dependency is available.
<Guest74> oh, I see, using and or
<pjb> (defpackage "SOME" (:export "THING")) (defmethod something ((thing some:thing)) (if (some-runtime-test-to-see-if-some-has-been-loaded-p) (do-something) (warn "SOME unavailable")))
<Guest74> I'd think that would run into issues with redefining a package, no?
<pjb> Well, there's some implementation dependent behavior, but in general implementations do the right thing.
Oddity has quit [Ping timeout: 250 seconds]
<pjb> The question is when you want to allow loading the SOME package?
<pjb> If you test at read-time, you must ensure loading it at compilation time, and at run-time.
<Guest74> yes, i've been thinking about that.  What if person loads a colour library after my drawing library.
<pjb> If you test at run-time, you must ensure it has been loaded at run-time, BEFORE you load you system.
<pjb> If you test at run-time, then you can also load it AFTER you load your system.
<sm2n> Guest74: you could put the method in a subsystem
<pjb> That would be clean indeed.
<pjb> A third system that you load only when both dependencies are available.
<Guest74> Yes, that's another option.  a one method system for all the colour libraries.
<Guest74> which makes for lots of systems.
<Guest74> i think there's at least 5 colour libraries?
<pjb> the number of systems defined doesn't matter.
<pjb> disk space is abondant and cheap.
<Guest74> I'd say it places more burden on the user for something that feels like it shouldn't be the users burden.
domovod has quit [Ping timeout: 240 seconds]
<Guest74> and it'd be easier for me to include all the methods in one file.
<pjb> lisp is sufficiently dynamic so that you may adapt at run-time.
<pjb> (when (and (find-package "SOME") (find-symbol "DOSTUFF" "SOME")) (funcall (find-symbol "DOSTUFF" "SOME") :blah))
<Guest74> this is different in that's specializing a method on a colour class from some colour library.  funcall would be easier.
<sm2n> The issue with all the other solutions is that you can have ordering issues, or have unnecessary runtime overhead
<sm2n> like, you have a reader conditional and someone loads your library before one of the libraries you support, then it won't work
Algernon666 has joined #commonlisp
<sm2n> and if you test at runtime, well, then you are testing at runtime
<sm2n> (which might be fine!)
<phoe> is there a portable way to check at macroexpansion time if some piece of code is being compiled via COMPILE or COMPILE-FILE rather than not?
<pjb> Nope.
<Guest74> I guess I can do one system per library which depends on that library and transforms each colour to a specified format so that any other surfaces get automatic support for those colours.
<pjb> You can test for *compile-file-pathname*
<phoe> COMPILE-FILE binds *COMPILE-FILE-PATHNAME*, so that's easier, but I need to find something COMPILE
<phoe> s/COMPILE/for COMPILE?
<phoe> pjb: yes
Algernon91 has quit [Ping timeout: 252 seconds]
<pjb> You can do: (let ((*when* 'compile-file)) (compile-file "foo")) (let ((*when* 'compile)) (compile nil (lambda (…) …))) or (let ((*when* 'execute)) (eval '(…)))
<pjb> Note that compile-file may call compile.
<phoe> yes, but I want the inverse - to check if a macro is being expanded by a compiler or an interpreter
<phoe> since I have some code that depends on it wrt LOAD-TIME-VALUE
<pjb> Macros can be expanded at different times, and multiple times, so it sounds like a very bad design to depend on that.
cosimone` has joined #commonlisp
<phoe> my main gripe is the behavior of LOAD-TIME-VALUE that can differ between evaluated and compiled code
<phoe> and I kind of wonder if I can actually depend on this behavior to detect this behavior
<Inline> heh
Guest74 has quit [Quit: Connection closed]
cosimone has quit [Ping timeout: 260 seconds]
<Inline> conceptually it sounds like at compile time the compiler would have to delay the init of stuff meant to be at load-time
<phoe> yes, and that is what happens
<Inline> so kinda like a container to be filled in later...
<phoe> take a look at the output of the possibly not compiled code though
cosimone` has quit [Quit: ERC (IRC client for Emacs 27.1)]
cosimone has joined #commonlisp
<Inline> hmm
Bike has quit [Quit: Connection closed]
MajorBiscuit has quit [Quit: WeeChat 3.3]
perrierjouet has quit [Quit: WeeChat 3.4]
rain3 has quit [Ping timeout: 268 seconds]
rain3 has joined #commonlisp
treflip has quit [Quit: good night!]
yitzi has quit [Quit: Bridge terminating on SIGTERM]
loke[m] has quit [Quit: Bridge terminating on SIGTERM]
luis` has quit [Quit: Bridge terminating on SIGTERM]
Mrtn[m] has quit [Quit: Bridge terminating on SIGTERM]
Spawns_Carpet[m] has quit [Quit: Bridge terminating on SIGTERM]
katco has quit [Quit: Bridge terminating on SIGTERM]
char[m] has quit [Quit: Bridge terminating on SIGTERM]
akater[m] has quit [Quit: Bridge terminating on SIGTERM]
edmrk[m] has quit [Quit: Bridge terminating on SIGTERM]
miique has quit [Quit: Bridge terminating on SIGTERM]
sp has quit [Quit: Bridge terminating on SIGTERM]
seragold[m] has quit [Quit: Bridge terminating on SIGTERM]
dieggsy has quit [Quit: Bridge terminating on SIGTERM]
sepanko has quit [Quit: Bridge terminating on SIGTERM]
EdLangley[m] has quit [Quit: Bridge terminating on SIGTERM]
prov[m] has quit [Quit: Bridge terminating on SIGTERM]
nworb has quit [Quit: Bridge terminating on SIGTERM]
kakuhen has quit [Quit: Bridge terminating on SIGTERM]
Arcsech has quit [Quit: Bridge terminating on SIGTERM]
Duuqnd has quit [Quit: Bridge terminating on SIGTERM]
saltrocklamp[m] has quit [Quit: Bridge terminating on SIGTERM]
opalvaults[m] has quit [Quit: Bridge terminating on SIGTERM]
Gnuxie has quit [Quit: Bridge terminating on SIGTERM]
zbrown[m] has quit [Quit: Bridge terminating on SIGTERM]
CodeBitCookie[m] has quit [Quit: Bridge terminating on SIGTERM]
linjian has quit [Quit: Bridge terminating on SIGTERM]
morganw has quit [Read error: Connection reset by peer]
thomaslewis has left #commonlisp [#commonlisp]
katco has joined #commonlisp
Jing has quit [Ping timeout: 250 seconds]
shozo has quit [Remote host closed the connection]
kpoeck has joined #commonlisp
Algernon666 has quit [Read error: Network is unreachable]
morganw has joined #commonlisp
<phoe> pjb: Inline: https://plaster.tymoon.eu/view/2901#2902 the second paste there
luis` has joined #commonlisp
edmrk[m] has joined #commonlisp
sepanko has joined #commonlisp
EdLangley[m] has joined #commonlisp
Mrtn[m] has joined #commonlisp
dieggsy has joined #commonlisp
akater[m] has joined #commonlisp
Gnuxie has joined #commonlisp
yitzi has joined #commonlisp
saltrocklamp[m] has joined #commonlisp
sp has joined #commonlisp
nworb has joined #commonlisp
kakuhen has joined #commonlisp
Duuqnd has joined #commonlisp
CodeBitCookie[m] has joined #commonlisp
Arcsech has joined #commonlisp
char[m] has joined #commonlisp
loke[m] has joined #commonlisp
seragold[m] has joined #commonlisp
zbrown[m] has joined #commonlisp
Spawns_Carpet[m] has joined #commonlisp
prov[m] has joined #commonlisp
opalvaults[m] has joined #commonlisp
linjian has joined #commonlisp
miique has joined #commonlisp
<phoe> I just realized that this can work as a poor man's "was this code minimally compiled" predicate
<EdLangley[m]> Guest74: I think the most common way to do this is just to define new systems with names like "a/b" and put the methods in the files loaded by that system.
kpoeck has quit [Quit: Client closed]
silasfox has joined #commonlisp
silasfox has quit [Client Quit]
Mrtn[m] has quit [Quit: Client limit exceeded: 20000]
zbrown[m] has quit [Quit: Client limit exceeded: 20000]
loke[m] has quit [Quit: Client limit exceeded: 20000]
katco has quit [Quit: Client limit exceeded: 20000]
luis` has quit [Quit: Client limit exceeded: 20000]
yitzi has quit [Quit: Client limit exceeded: 20000]
Gnuxie has quit [Quit: Client limit exceeded: 20000]
opalvaults[m] has quit [Quit: Client limit exceeded: 20000]
saltrocklamp[m] has quit [Quit: Client limit exceeded: 20000]
Spawns_Carpet[m] has quit [Quit: Client limit exceeded: 20000]
<EdLangley[m]> Guest74: This is why you define a my-library/colour-library system
<EdLangley[m]> That depends on both
<EdLangley[m]> There's also this: https://asdf-system-connections.common-lisp.dev
<EdLangley[m]> I don't really like how its internals work, but the interface is something I like: automatically load a system based on the other systems that have been loaded
Duuqnd has quit [Quit: Client limit exceeded: 20000]
sp has quit [Quit: Client limit exceeded: 20000]
edmrk[m] has quit [Quit: Client limit exceeded: 20000]
miique has quit [Quit: Client limit exceeded: 20000]
linjian has quit [Quit: Client limit exceeded: 20000]
Arcsech has quit [Quit: Client limit exceeded: 20000]
akater[m] has quit [Quit: Client limit exceeded: 20000]
nworb has quit [Quit: Client limit exceeded: 20000]
dieggsy has quit [Quit: Client limit exceeded: 20000]
CodeBitCookie[m] has quit [Quit: Client limit exceeded: 20000]
Inline has quit [Remote host closed the connection]
char[m] has quit [Quit: Client limit exceeded: 20000]
luis` has joined #commonlisp
Mrtn[m] has joined #commonlisp
dieggsy has joined #commonlisp
Gnuxie has joined #commonlisp
edmrk[m] has joined #commonlisp
akater[m] has joined #commonlisp
sp has joined #commonlisp
CodeBitCookie[m] has joined #commonlisp
nworb has joined #commonlisp
yitzi has joined #commonlisp
saltrocklamp[m] has joined #commonlisp
loke[m] has joined #commonlisp
Duuqnd has joined #commonlisp
char[m] has joined #commonlisp
Spawns_Carpet[m] has joined #commonlisp
miique has joined #commonlisp
zbrown[m] has joined #commonlisp
opalvaults[m] has joined #commonlisp
linjian has joined #commonlisp
Arcsech has joined #commonlisp
Inline has joined #commonlisp
sepanko has quit [Quit: Client limit exceeded: 20000]
Rue has quit [Quit: WeeChat 3.4]
Oladon has joined #commonlisp
notzmv has quit [Ping timeout: 240 seconds]
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
<dbotton> is there a common thread safe hash used in cl?
katco has joined #commonlisp
sepanko has joined #commonlisp
<phoe> you could possibly ask hayley for submitting that one to quicklisp
<random-nick> some implementations also add a keyword argument to make-hash-table which makes it thread safe
<random-nick> but that probably just uses a mutex, not sure
<dbotton> thanks
aartaka has quit [Ping timeout: 256 seconds]
tane has quit [Quit: Leaving]
Colleen has quit [Quit: Colleen]
cosimone has quit [Remote host closed the connection]
Colleen has joined #commonlisp
cosimone has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
epolanski has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Bike has joined #commonlisp
xsperry has quit [Ping timeout: 268 seconds]
cjb has joined #commonlisp
Oladon has quit [Quit: Leaving.]
waleee has joined #commonlisp
Dynom has quit [Quit: WeeChat 3.4]
jealousmonk has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
thomaslewis has joined #commonlisp
aartaka has joined #commonlisp
morganw has quit [Remote host closed the connection]
aeth has quit [Ping timeout: 245 seconds]
Algernon666 has joined #commonlisp
aeth has joined #commonlisp
mrcom has joined #commonlisp
Algernon91 has joined #commonlisp
Algernon666 has quit [Ping timeout: 250 seconds]
pve has quit [Quit: leaving]
attila_lendvai has quit [Ping timeout: 250 seconds]
akoana has quit [Quit: leaving]
<phoe> another day another article
<phoe> L-T-V is fun
<EdLangley[m]> phoe: I think you should treat this as unspecified behavior
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
<EdLangley[m]> that is, just use load-time-value without checking and then document that the code has to be compiled to work correctly
<phoe> EdLangley[m]: it's possible to (ab)use this behavior to detect code that wasn't minimally compiled and signal an error
<EdLangley[m]> Yeah
<phoe> it's very likely not portable and depends on unspecified behavior as you mentioned, but it seems to be reliable enough on modern implementations
<phoe> as in CLISP ABCL ACL LW
<EdLangley[m]> But, I think that sort of "defensive programming" in a macro like static-let causes more problems than it would help
<EdLangley[m]> It's better, IMO, to document the situations in which static-let fails and just generate normal code
<EdLangley[m]> Basically, this means that you can't portably use l-t-v for things like memoization
<phoe> actually you can!
<phoe> just remember to COMPILE your code
<Bike> i mean, it's not hard to force code to be compiled.
<EdLangley[m]> Yeah
<EdLangley[m]> I just mean, the bare defun form doesn't work
<EdLangley[m]> s/,//
<phoe> yes - thank goodness that ASDF compiles everything by default, so you don't really get to play with interpreted code outside REPLs of these four implementations
<phoe> so the fallout is pretty limited
<phoe> everyone uses SBCL or CCL after all /s
<EdLangley[m]> So, you can in sbcl
<phoe> you can what exactly?
<phoe> oh, SBCL has an interpreter mode - it's not on by default though
<Bike> static-let is exactly the kind of thing that i'd expect to not happen in an evaluator, too
<EdLangley[m]> Yeah, but someone probably has the interpreter enabled in their sbclrc
<phoe> well, I'd rather signal an error than silently do the wrong thing in such a situation
<Bike> as in, i don't think an evaluator could reasonably be expected to have any kind of "static" semantics
<EdLangley[m]> It's not the "wrong thing"
<EdLangley[m]> If you want this counter behavior, you should use the let over lambda pattern :)
<phoe> EdLangley[m]: not a wrong thing from the perspective of LOAD-TIME-VALUE but a wrong thing from the perspective of an operator whose values are meant to persist across function calls in the same way closure values do
<phoe> and that's what STATIC-LET attempts to be
<EdLangley[m]> At most, you should emit a warning
<EdLangley[m]> An error would be really annoying
<phoe> hm
<phoe> that's a nice idea
<EdLangley[m]> But, the problem is, you have to do this at runtime
<EdLangley[m]> And I don't think it's worth the overhead
<EdLangley[m]> You can't detect it statically during macroexpansion
<Bike> hm, wonder if you couldn't hack something up
<phoe> I have tried to hack something up to detect it during macroexpansion
<phoe> and failed
<Bike> say, you have a macro function for static-let or whatever that returns the usual form the first time, and on subsequent expansions returns an error form
<EdLangley[m]> It's impossible to detect during macroexpansion
<EdLangley[m]> because (defun foo ()...) (compile 'foo) solves the problem
<phoe> Bike: can't do that, a macro function can be called an arbitrary number the times
<Bike> although actually i guess there's no guarantee the compiler only expands yeah.
<EdLangley[m]> And you can't tell whether or not someone is about to run (compile 'foo)
<Bike> clearly you need to introduce another special operator to conditionalize on evaluation/compilation status.
<phoe> oh no
<Bike> although that could itself get tricky in situations like when the compiler runs the evaluator
<EdLangley[m]> (defun foo () ...) (foo) is bad (defun foo () ...) (compile 'foo) (foo) is good
<EdLangley[m]> You can't tell in the context of the DEFUN whether or not (foo) is safe
aartaka has quit [Ping timeout: 260 seconds]
azimut_ has joined #commonlisp
aartaka has joined #commonlisp
azimut has quit [Ping timeout: 276 seconds]
aartaka has quit [Ping timeout: 250 seconds]
wyrd has joined #commonlisp
igemnace has joined #commonlisp
akoana has joined #commonlisp
tyson2 has joined #commonlisp
mon_aaraj has joined #commonlisp
Algernon91 has quit [Ping timeout: 252 seconds]
Oladon has joined #commonlisp
lispy has joined #commonlisp
occ has quit [Ping timeout: 256 seconds]