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>
taiju has joined #commonlisp
Mandus_ has quit [Ping timeout: 245 seconds]
Mandus_ has joined #commonlisp
Psybur has quit [Remote host closed the connection]
Psybur has joined #commonlisp
patrice has joined #commonlisp
attila_lendvai has quit [Ping timeout: 265 seconds]
Mandus_ has quit [Ping timeout: 252 seconds]
Mandus_ has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.3]
perrierjouet has joined #commonlisp
NeoCron has quit [Remote host closed the connection]
patrice has quit [Ping timeout: 265 seconds]
Mandus_ has quit [Ping timeout: 260 seconds]
Mandus_ has joined #commonlisp
Inline has quit [Ping timeout: 265 seconds]
Alfr has quit [Quit: Leaving]
selwyn has quit [Read error: Connection reset by peer]
kevingal has quit [Remote host closed the connection]
JeromeLon has quit [Ping timeout: 245 seconds]
kakuhen has joined #commonlisp
kakuhen has quit [Remote host closed the connection]
kakuhen has joined #commonlisp
CrashTestDummy3 has joined #commonlisp
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 252 seconds]
kakuhen has quit [Ping timeout: 265 seconds]
CptKirk has joined #commonlisp
Mandus_ has quit [Remote host closed the connection]
JeromeLon has joined #commonlisp
Alfr has joined #commonlisp
tyson2 has joined #commonlisp
patrice has joined #commonlisp
Mandus_ has joined #commonlisp
Psybur has quit [Remote host closed the connection]
prxq_ has joined #commonlisp
prxq has quit [Ping timeout: 265 seconds]
abrantesasf has joined #commonlisp
_abrantesasf_ has joined #commonlisp
abrantesasf has quit [Ping timeout: 265 seconds]
_abrantesasf_ has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
akoana has left #commonlisp [#commonlisp]
patrice has quit [Quit: Leaving]
beach` is now known as beach
Mandus_ has quit [Ping timeout: 265 seconds]
Mandus_ has joined #commonlisp
<beach> Good morning everyone!
waleee has quit [Ping timeout: 265 seconds]
Bike has quit [Quit: Lost terminal]
Mandus_ has quit [Ping timeout: 252 seconds]
semz has quit [Ping timeout: 265 seconds]
taiju has quit [Ping timeout: 265 seconds]
Mandus_ has joined #commonlisp
utis has quit [Ping timeout: 265 seconds]
taiju has joined #commonlisp
semz has joined #commonlisp
Jach has quit [Remote host closed the connection]
taiju has quit [Quit: Quit]
igemnace has quit [Ping timeout: 245 seconds]
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
Mandus_ has quit [Remote host closed the connection]
Mandus_ has joined #commonlisp
<bitspook[m]> Good morning!
<beach> Hello bitspook[m].
xaotuk has quit [Ping timeout: 252 seconds]
xaotuk has joined #commonlisp
dec0d3r has quit [Remote host closed the connection]
xaotuk has quit [Ping timeout: 265 seconds]
xaotuk has joined #commonlisp
<dre> I need a good project to work with to help me learn CL
<dre> all the projects I come up with are like mini python startup things
<beach> Sounds good. What are you interested in?
<dre> not sure, startups really
<beach> Information systems, games, web stuff, compilers, programming tools?
<dre> I'm learning a bit of C# for game dev, (unity) - and both my job and (interest?) are in web and web-systems (crud etc)
<dre> I love programming tools, that's a good shot
char has joined #commonlisp
<dre> I'd learn emacs if I wasn't so involved in vim
<dre> interesting, thanks
<beach> Sure. Feel free to ask questions if you want.
charles__ has quit [Ping timeout: 265 seconds]
<dre> is there any good videos about the "philosophy" of lisp?
<beach> Hard to say. But you can ask here or in #clschool. It depends a bit on what you mean by that word.
<dre> oh coo, interesting, thanks. I'll stop wasting time :P
<dre> I'll hope to ramp up my CL usage in the new year.
<beach> You are wasting people's time only if you don't improve despite the information you are give. :)
<dre> :P good point
<beach> For starters, Common Lisp is not considered a "functional programming language" but a "multi-paradigm language", so you will see pure functional style in Common Lisp perhaps less often than many people expect.
<beach> A lot of modern Common Lisp code uses the Common Lisp Object System, which is totally different from more traditional object-oriented languages (luckily).
igemnace has joined #commonlisp
<hayley> I could provide my own "philosophy of Lisp", but it wouldn't be the philosophy of Lisp, as many people have come to drastically different conclusions than I have. So I suspect there isn't one.
<dre> yeah I get you
<dre> can't gasp water, etc :P
Mandus_ has quit [Ping timeout: 245 seconds]
<hayley> While beach provides good advice, I suspect you are looking for some deep meaning with a "philosophy", and I don't think there is any.
amk has quit [Ping timeout: 268 seconds]
amk has joined #commonlisp
Mandus_ has joined #commonlisp
Mandus_ has quit [Ping timeout: 245 seconds]
Mandus_ has joined #commonlisp
Mandus_ has quit [Ping timeout: 260 seconds]
pve has joined #commonlisp
lisp123 has joined #commonlisp
<lisp123> Is there a way for ASDF to load all files in a directory?
Nilby has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
attila_lendvai has joined #commonlisp
CptKirk has quit [Ping timeout: 256 seconds]
Mandus_ has joined #commonlisp
<lisp123> pve: That's a great tool!
<pve> lisp123: Thanks, I'm still on the fence :)
<lisp123> Do I just need to do (asdf:defsystem #:my-stem :defsystem-depends-on ("alphabetical-asdf") :class "alphabetical-asdf:system" :dependencies (...)) and no :file or any other commands?
amb007 has quit [Ping timeout: 265 seconds]
<pve> lisp123: yep, that should work
amb007 has joined #commonlisp
<lisp123> pve: Thanks. IMO this is great for utilities :) The future me thanks you again :D
<pve> lisp123: no problem, I have another one I call "lexicographic-loader" that does the same thing but without ASDF
<pve> which lets you "require directories", though I haven't uploaded that one yet
shka has joined #commonlisp
<pve> (I must credit jackdaniel for "lexicographic", don't think I would have come up with it myself :)
<lisp123> Nice, will check it out too
<lisp123> (If you upload it, no rush - I think the ASDF one is just what I'm after)
<pve> lisp123: If you're into small utilities and stuff like that, you might check out:
<pve> I just uploaded it yesterday, so it's a work in progress
<pve> It takes an asdf system, and creates a file containing a bunch of LOAD forms that can load the system using e.g. sbcl --script
<pve> or load the files of that system and its dependencies without asdf, rather
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
cosimone has joined #commonlisp
<lisp123> pve: Sounds interesting
<lisp123> Will try and use it when setting up web servers
<pve> lisp123: well I guess it depends a lot on your workflow, saving a core could work just as well, if not better
<pve> I'm still experimenting
<lisp123> That's true
amb007 has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
<pve> lisp123: I'm mostly thinking of the situation where you work a lot in the shell (like a remote server) and want, say 10, command line utils and don't feel like saving a separate core for each util
<pve> there are of course other solutions, like packing all of them into the same core
Cymew has joined #commonlisp
<lisp123> That makes sense
gaqwas has joined #commonlisp
<lisp123> Sometimes having too much in one program can make it confusing for users, although its likely the same number of commands whether one splits it up into separate utilities or keeps them together
<lisp123> There's also a counterpoint, so no real right answer
<pve> I still don't know if there are situations where this "loader" business can beat saving a core, but as I said, I'm experimenting
<lisp123> pve: Good luck, will be curious to listen to your conclusions at a later stage
<pve> SBCL fasls can be executed directly from the shell, so there's a tiny convenience factor too
<pve> thanks
amb007 has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
Mandus_ has quit [Ping timeout: 245 seconds]
amb007 has quit [Read error: Connection reset by peer]
makomo has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
cranium has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 252 seconds]
Mandus_ has joined #commonlisp
<mfiano> I decided to take a break this week from regular coding and dive into the classic PAIP. I must say it really is a wonderful book that opened up my mind on a few topics.
selwyn has joined #commonlisp
<mfiano> The one thing to keep in mind is being nearly 30 years old, some of the code is dated. For example, structs are used everywhere instead of classes. CLtL2 was published in two years prior, but CLOS must not have been popular yet.
<mfiano> He does write good code though, so it's not bad to read!
<mfiano> Next up is going to be AIAMA which I expect to take _much_ longer to work through.
<jackdaniel> AIAMA?
<jackdaniel> minion: what is AIAMA?
<minion> maybe you need to ask my master, chandler - he knows a lot
<jackdaniel> minion: tell me about AIAMA
<minion> Sorry, I couldn't find anything in the database for ``AIAMA''.
<pve> AIMA?
<mfiano> His other book. Artificial Intelligence - A Modern Approach
<jackdaniel> ah, this one - thanks
<pve> did that one cover deep learning?
<mfiano> The 4th edition adds a lot of ML/DL
<mfiano> Which was released very recently
<pve> right
<mfiano> Prior to that not really from what I could tell
<mfiano> 4e also replaced all the Lisp with pesudocode
makomo_ has joined #commonlisp
<pve> I think the one we used in school had pseudo code too, about 15 years ago. But I could be remembering this wrong..
<mfiano> Ah I am misremembering, not you.
<mfiano> Ok here's the deal:
<mfiano> 1e had an online code repository offering CL versions of the algorithms
<mfiano> 2 and 3 had Lisp, Java, and Python
<mfiano> 4 Has only Java and Python
<jackdaniel> 5 Will have JavaPythscript
<pve> a sad trend indeed
<mfiano> As you can see, last update to the lisp material was 6 years ago
<mfiano> Well besides readme changes
<pve> It would be cool to compare the code between the three languages
<lisp123> mfiano: Take it as a positive, lack of code means one has to write it themselves
<mfiano> Looks like the text of 4e lies. I see only the Python repository has been updated for 4e, not Java
<lisp123> Guy Steele ported TeX from WAITS to ITS
<mfiano> ITS, the language that gave us GPS?
<lisp123> something Time Share (brb)
<mfiano> PAIP introduces GPS in chapter 4. It was marketed as the AI program that could solve any problem (General Problem Solver)
<hayley> The Incompatible Timesharing System?
<lisp123> yep thats the one
<mfiano> Looks like I got my acronyms wrong. Not ITS
<mfiano> IPL, the language that inspired McCarthy to create Lisp.
<mfiano> Pioneered list manipulation and a few other lispy things
cage has joined #commonlisp
hendursa1 has joined #commonlisp
hendursaga has quit [Ping timeout: 276 seconds]
xaotuk has quit [Quit: xaotuk]
selwyn_ has joined #commonlisp
selwyn has quit [Ping timeout: 245 seconds]
loskutak has joined #commonlisp
CrashTestDummy3 has joined #commonlisp
Inline has joined #commonlisp
scymtym has quit [Ping timeout: 252 seconds]
CrashTestDummy2 has quit [Ping timeout: 265 seconds]
karlosz has joined #commonlisp
gaqwas has quit [Ping timeout: 252 seconds]
karlosz has quit [Quit: karlosz]
dec0d3r has joined #commonlisp
dec0d3r has quit [Remote host closed the connection]
lisp123 has quit [Quit: Leaving...]
donovanquixote has joined #commonlisp
zacque has joined #commonlisp
ahlk has quit [Ping timeout: 260 seconds]
random-nick has joined #commonlisp
<greyrat> pjb: Using the dumped executor to run scripts worked so well I couldn't even dream of it :)) I am now tempted to go take a look at Julia's image dumper again. Though Julia is slow to start even with no deps ... What other languages have you seen with such a capibility?
loskutak has quit [Ping timeout: 246 seconds]
<greyrat> What is so sad is that I had researched the startup costs of CL the first thing when I was deciding to start learning/using it. I found the image dumping thing, but only as a way to dump each individual script, which, with the images huge sizes, was not all too sustainable. I still went with CL because my next best option was Golang, which, *ughh*.
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
lisp123 has joined #commonlisp
makomo_ has quit [Ping timeout: 268 seconds]
hhdave has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
selwyn_ has quit [Read error: Connection reset by peer]
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
loskutak has joined #commonlisp
Inline has quit [Remote host closed the connection]
amb007 has joined #commonlisp
scymtym has joined #commonlisp
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
raeda_ has joined #commonlisp
raeda has quit [Remote host closed the connection]
makomo_ has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
tyson2 has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
Inline has joined #commonlisp
<pjb> greyrat: any image-based language. Smalltalk, Logo. Of course, they're all derived from lisp that was image based from the start…
<pjb> greyrat: it's easy to use the pname in the image to dispatch to one function or the other. https://github.com/informatimago/commands
<jackdaniel> pjb: was lisp really image-based from the start? didn't it pick it up from smalltalk?
<pjb> LISP 1.5 is an image-based environment, even if it uses punched cards and line printers…
<pjb> only LISP 1.5 didn't have save-lisp-image yet ;-)
kpoeck has joined #commonlisp
<pjb> Good question, which was the first lisp with a save-image function?
<pjb> interlisp came in the 80s, so after Smalltalk…
<pjb> lisp machines had such a feature IIRC.
<jackdaniel> I see, thanks
<greyrat> Is the new Smalltalk dialect, Pharo, any good? It's a GUI lang and it doesn't play nice with emacs, so I haven't yet tried it.
loskutak has quit [Ping timeout: 265 seconds]
srji has joined #commonlisp
<srji> using sbcl on windows10 and try to (load "sdraw.generic") or (load "sdraw.gui") and get file not found
<greyrat> srji: (Not an expert, but how have you "installed" these deps? Are they in your load path?)
<greyrat> Perhaps try using quicklisp?
<srji> i couldnt find sdraw using quicklisp
<srji> i was just beeing naive and intended sdraw is part of sbcl distribution
<greyrat> I have no idea, it might be.
<random-nick> LOAD is used to load a .lisp file, not to load a system
<srji> i found the sdraw repo on github
<random-nick> you could try cloning it into your quicklisp installation's local-projects folder
loskutak has joined #commonlisp
totoro has quit [Read error: Connection reset by peer]
rotateq has joined #commonlisp
<srji> i did. it is working now, ty
Bike has joined #commonlisp
Michal has joined #commonlisp
loskutak has quit [Ping timeout: 245 seconds]
<Michal> Hi, does anybody know how to create local versions of special variables (i.e. they "die" after the function completes)?
<lisp123> (let ((*test* asdf)) (declare (special *test*)) ....)?
<random-nick> what do you mean by local versions of special variables?
waleee has joined #commonlisp
<Michal> Does that work?
<Michal> Will *test* die after the let form finishes?
<Michal> If I use defparameter, then it always exists, I just want it to exist for the length of time of the enclosing function (but then refer to it in other functions called within that enclosing function)
<random-nick> why not just have the global value be a dummy value like nil?
<Michal> Would I need to reset it to nil at the end of the function then? To be safe
<random-nick> if you do it like this then all functions which use it will have to have a (declare (special *test*))
<Xach> Michal: no. special variables "reset" automatically. that makes them very nice.
<random-nick> LET and PROGV don't change the global value/binding of a special variable
<Xach> another option is defining it unbound.
<random-nick> they create a new binding within their dynamic extent
<Michal> Oh so I could do like (defvar *x*) .... (let ((*x* "value")) .... ) and *x* will resort to unbound after the let form finishes?
<beach> Michal: yes, but it will still be globally special. Declare it special locally as some people suggested, and it will "disappear".
<Michal> Oh I see. That's cool.
<random-nick> Michal: you could look at it that way, but *x* will never be "value" globally
<Michal> Thanks Xach, random-nick Beach. I think I get it
<random-nick> this makes a difference since most implementations make sure that a let from one thread doesn't change the binding in another thread
<random-nick> also makes a difference for SYMBOL-VALUE
<Michal> Is there any other gotchas to be aware of?
jealousmonk has joined #commonlisp
<jackdaniel> name your special variables *with-earmuffs* to not confuse them
<jackdaniel> otherwise say you have a variable car and in entirely unrelated function you type (let ((car :some-car)) …) -- you will dynamically shadow the original value then
<Michal> Gotcha
<Michal> I will do that
MatrixTravelerb4 has quit [Write error: Connection reset by peer]
Bi[m] has quit [Write error: Connection reset by peer]
luis` has quit [Read error: Connection reset by peer]
santiagopim[m] has quit [Read error: Connection reset by peer]
happy-dude has quit [Write error: Connection reset by peer]
Mrtn[m] has quit [Read error: Connection reset by peer]
bhyde[m] has quit [Write error: Connection reset by peer]
yitzi has quit [Write error: Connection reset by peer]
akater[m] has quit [Write error: Connection reset by peer]
Arcsech has quit [Read error: Connection reset by peer]
hayley has quit [Read error: Connection reset by peer]
bitspook[m] has quit [Remote host closed the connection]
rudi has quit [Write error: Connection reset by peer]
etimmons has quit [Write error: Connection reset by peer]
Duuqnd has quit [Read error: Connection reset by peer]
saltrocklamp[m] has quit [Read error: Connection reset by peer]
loke[m] has quit [Write error: Connection reset by peer]
Gnuxie has quit [Write error: Connection reset by peer]
alphapapa[m] has quit [Write error: Connection reset by peer]
icepic1984[m] has quit [Remote host closed the connection]
dualinverter[m] has quit [Write error: Connection reset by peer]
dieggsy has quit [Write error: Connection reset by peer]
katco has quit [Remote host closed the connection]
CodeBitCookie[m] has quit [Remote host closed the connection]
katco has joined #commonlisp
Michal has left #commonlisp [ERC (IRC client for Emacs 27.1)]
waleee has quit [Ping timeout: 246 seconds]
luis` has joined #commonlisp
alphapapa[m] has joined #commonlisp
santiagopim[m] has joined #commonlisp
etimmons has joined #commonlisp
rudi has joined #commonlisp
Mrtn[m] has joined #commonlisp
happy-dude has joined #commonlisp
Gnuxie has joined #commonlisp
dieggsy has joined #commonlisp
yitzi has joined #commonlisp
saltrocklamp[m] has joined #commonlisp
dualinverter[m] has joined #commonlisp
hayley has joined #commonlisp
Bi[m] has joined #commonlisp
Arcsech has joined #commonlisp
MatrixTravelerbo has joined #commonlisp
loke[m] has joined #commonlisp
Duuqnd has joined #commonlisp
CodeBitCookie[m] has joined #commonlisp
bhyde[m] has joined #commonlisp
icepic1984[m] has joined #commonlisp
akater[m] has joined #commonlisp
bitspook[m] has joined #commonlisp
ahlk has joined #commonlisp
waleee has joined #commonlisp
rain3 has joined #commonlisp
<rain3> how to set the documentation string for a symbol-macro?
<jackdaniel> rain3: (setf (documentation 'foo 'symbol-macro) "bla bla") but it doesn't work on sbcl (ccl accepts that without fail)
<jackdaniel> but it doesn't have a specialization for the symbol-macro, it just have "accepting" default method, unlike sbcl -- you may want to define methods for the accessor documentation
<jackdaniel> specialized on (eql 'symbol-macro)
rotateq has quit [Remote host closed the connection]
<pjb> (defmethod documentation ((symbol symbol) (kind (eql 'symbol-macro))) (getf symbol 'symbol-macro-documentation))
<pjb> (defmethod (setf documentation) (new-doc (symbol symbol) (kind (eql 'symbol-macro))) (setf (getf symbol 'symbol-macro-documentation) new-doc))
scymtym_ has joined #commonlisp
<pjb> (defmethod documentation ((symbol symbol) (kind (eql 'symbol-macro))) (get symbol 'symbol-macro-documentation))
<pjb> (defmethod (setf documentation) (new-doc (symbol symbol) (kind (eql 'symbol-macro))) (setf (get symbol 'symbol-macro-documentation) new-doc))
<pjb> (setf (documentation 'foo 'symbol-macro) "bla bla") (documentation 'foo 'symbol-macro) #| --> "bla bla" |#
<pjb> rain3: of course, you have to choose where to store that documentation. Also, when and how to store it and retrieve it from a fasl file.
scymtym has quit [Ping timeout: 265 seconds]
waleee has quit [Quit: WeeChat 3.3]
waleee has joined #commonlisp
scymtym_ has quit [Ping timeout: 252 seconds]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
<rain3> jackdaniel, pjb: thanks
selwyn has joined #commonlisp
selwyn has quit [Remote host closed the connection]
selwyn has joined #commonlisp
raeda_ has quit [Quit: Leaving]
ec has joined #commonlisp
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
danirukun[m] has joined #commonlisp
tyson2 has joined #commonlisp
khrbt has quit [Ping timeout: 268 seconds]
khrbt has joined #commonlisp
makomo_ has quit [Ping timeout: 245 seconds]
ahlk has quit [Read error: Connection reset by peer]
ahlk has joined #commonlisp
<beach> ELS has been announced. Porto, March 21-22.
loskutak has joined #commonlisp
rogersm has joined #commonlisp
scymtym has joined #commonlisp
<JeromeLon> Is it typical for a common lisp implementation to use generic functions to implement features that have to deal with subclasses? For example Stream has several subclasses, is read-byte a generic function?
<beach> JeromeLon: I suspect not. Simply because most implementations began life before CLOS was part of the standard.
<beach> JeromeLon: Also, because of that, most implementations include CLOS last in the build process, or at least very late.
CptKirk has joined #commonlisp
<beach> JeromeLon: That's why I designed SICL bootstrapping from scratch. We boot CLOS first. This makes it possible for many more functions to be generic.
<JeromeLon> beach: interesting, thanks!
<beach> Another reason would be performance. Most implementations implement generic dispatch in a not very optimal way.
<beach> We fixed that one too. :)
molson__ has joined #commonlisp
makomo has joined #commonlisp
molson_ has quit [Ping timeout: 265 seconds]
makomo_ has joined #commonlisp
<johnjay> beach: CLOS was bolted on to lisp later?
<johnjay> er common lisp
kpoeck has quit [Quit: Client closed]
<beach> Well, it's part of the standard, but there was a language named Common Lisp before the standard, and it is documented in the first edition of "Common Lisp, the Language".
<beach> And most Common Lisp implementations started life before the standard was created.
<beach> Like SBCL came from CMUCL which came from Spice Lisp.
<gin> (print *list* f) prints the entire list into a file after a blank line? why does it insert a blank line at the top of the file?
<johnjay> right. there's always an interplay between practice and the standards that codify them
<beach> Like, KCL first came out in 1984, 10 years before the standard. And KCL is an ancestor of ECL, just to name one more example.
<gin> one more question. is there a pretty print alternative to (print *list* f) that neatly formats and indents nested items of the list while writing to the file?
<beach> And Spice Lisp is from 1980.
<johnjay> so I git cloned SICL repo and looked for build instructions. but the FAQ helpfully informs that SICL cannot be run at all
<beach> johnjay: Correct. It is not ready to be used.
<johnjay> but the readme says i can get a repl
<johnjay> I don't understand step 3: "Make sure the top-level directory can be found by ASDF"
<beach> johnjay: It's a bit hard to explain. Most SICL code can be executed, but it runs inside a host Common Lisp implementation used for bootstrapping. But th code that runs has been compiled with the SICL compiler.
<johnjay> so i need to startup sbcl and use it to load something with asdf?
* johnjay used asdf like one time
<beach> johnjay: I wouldn't bother if I were you. It is not terribly interesting. Look at the code instead. Grep for `defgeneric' for instance.
<gin> johnjay: do you not need to use asdf for packaging? if not asdf what else do you use?
<JeromeLon> gin: that's the definition of print: "just like prin1 except that the printed representation of object is preceded by a newline and followed by a space."
<johnjay> i don't use anything. i'm still learning how to use CL
<gin> JeromeLon: yes, but why so? what was the reason that someone thought print should insert a newline?
<johnjay> right now it looks like on debian I need.... cl-asdf from the repo
<beach> gin: In a distant past, the convention was to start a fresh line rather than end with a newline.
<johnjay> the alternative is to download asdf.lisp and put it... somewhere?
<beach> johnjay: It is included in all Common Lisp implementations.
kevingal has joined #commonlisp
<JeromeLon> gin: for pretty printing, you want each object on a new line, which can be achieved by either adding a newline after or before each expression
<gin> beach: wow! I had no idea. is there anything on the internet where I can read more about this or see examples?
<beach> gin: I suspect it is an oral tradition.
<johnjay> ah so I was supposed to do (require "asdf")
<johnjay> that worked in sbcl
<gin> JeromeLon: need to add spaces too for indentation after each newline. if there is something in the standard lib that would be very nice.
<gin> and the right number of spaces too based on nesting level. before I write code for it want to be sure this is something that does not exist in the standard lib.
<beach> gin: Did you try the pretty printer?
<johnjay> i was trying to load something into sbcl before but it wasn't in quicklisp
<johnjay> so i ended up installing CCL in a folder lol but dunno how to install it system wide
<gin> beach: I didn't. let me look it up
<johnjay> beach: i wonder what the cl-asdf package does on debian then if sbcl already has its own
<johnjay> it apparently has *a lot* of .lisp files
<beach> johnjay: Maybe read the install instructions?
<beach> clhs *print-pretty*
<beach> gin: ^
<gin> thanks
<johnjay> beach: i imagine i'm missing obvious stuff. I went to the sicl dir, started, sbcl, typed (require "asdf") and then (asdf:load-system :sicl-boot) but get error
<JeromeLon> gin:when printing B after A, only the function printing B has all the information in hand to determine whether a newline should be inserted (as it could depend on the length of the representation of B), so this could be a possible rationale?
<johnjay> well it's fine... at least i know asdf is loaded!
<JeromeLon> (when A and B are sub-expressions)
<beach> johnjay: It has to do with the first instruction, i.e. "make sure ...". I think you are better off trying something simpler than booting SICL at this point.
<johnjay> probably true
<Josh_2> When using (ps:lisp <js generating fun>) parenscript has a real issue with getting the nesting correct, is this just me?
Devon has quit [Ping timeout: 245 seconds]
<gin> (substitute #\o #\x "foo") => "foo". why isnt the result "fxx"? what i did wrong?
<gin> oh I got the order of arguments wrong
lisp123 has quit [Quit: Leaving...]
<gin> this works (substitute #\x #\o "foo") => "fxx"
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
Cymew has quit [Ping timeout: 245 seconds]
Psybur has joined #commonlisp
<beach> So either everybody already knew about the ELS dates, or nobody understood what I was referring to. So anyway, I hope many of you show up in Porto, March 21-22, 2022 for the European Lisp Symposium. Even better, submit an article.
<beach> ... Porto being a city in Portugal, for those who don't know.
<greyrat> How do I replace the char 'U+00A0' with ' ' in a string?
<beach> Do you not know what the character is? That looks like a code point.
<beach> You could try (code-char <code-point>) to turn it into a character.
cranium has quit [Quit: Leaving]
lisp123 has joined #commonlisp
<edgar-rft> greyrat: I think most modern CL implementations will support something like (setf my-string (substitute #\Space (code-char ##a0) my-string))
<edgar-rft> argh, (code-char #xa0) of course
<greyrat> edgar-rft: Can't I just use #\NO-BREAK_SPACE ?
<Bike> you probably can, or #\u+a0
<edgar-rft> greyrat: yes, but you asked for 'U+00A0' :-)
<JeromeLon> greyrat: yes, I am assuming that people were using code-char to teach you
<greyrat> No, I found it manually, then converted it to decimal manually, then found out it was #\NO-BREAK_SPACE :)))
<greyrat> (pandoc inserts it in orgmode files)
<greyrat> Bike: this is the easiest by far :thumbs-up:
zacque has quit [Quit: Client closed]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
<beach> greyrat: You converted it to "decimal"? That's strange.
<greyrat> I didn't know how to write hex literals, so I naturally had to convert it to decimal
<beach> Hmm, OK.
ebrasca has joined #commonlisp
xsperry has joined #commonlisp
<greyrat> Is there a reader macro to write regexes? (basically it shouldn't treat '\' as special)
<greyrat> Bike: It errors on #?/(?:\n|\A)\h*(?:(?::PROPERTIES:(?:.\n)*?:END:|(?:<<.*?>>))\h*/
<greyrat> `illegal terminating character after a colon: #\(`
<greyrat> I guess it wants to be too smart. Anything 'dumber'?
<semz> I'm not sure how reliable Unicode character names are across implementations
<Bike> error when? on my system that reads fine, but doesn't work as a regex because the >: parent groups are mismatched
<Bike> though this isn't something i usually deal with, so i could be missing something obvious
tyson2 has joined #commonlisp
<semz> might be safer to go with (char-code ...) if portability is a concern, every implementation worth its salt will constant fold that
<semz> uh, code-char i mean
<Bike> the ?: groups are mismatched, i meant
<greyrat> semz: have you seen any examples of unicode names being different?
<Bike> typing is hard
<semz> greyrat: #\HIRAGANA_LETTER_O is accepted by SBCL but not CCL
<greyrat> Bike: They weren't mismatched in my actual code, I don't know why they pasted like that
<greyrat> (?:\n|\A)\h*(?:(?::PROPERTIES:(?:.|\n)*?:END:)|(?:<<.*?>>))\h*
<semz> The less "obscure" ones will probably be more reliable, and at least CCL and SBCL both accept #\No-Break_Space
<Bike> i don't get an error from that either
<Bike> either in reading in as a string or using as a regex
<greyrat> (BTW the paste was probably corrupted by Lispy's "safe paste".)
<greyrat> Bike: I can't read it at all. It also makes my emacs go crazy: https://files.lilf.ir/tmp/tmp.qcSVmq8jdB.png
<Bike> and this is a read error? like you see it if you enter it at the repl or something?
aksej[m] has joined #commonlisp
<ebrasca> Do someone here uses bknr?
<lisp123> ebrasca: Yes
<ebrasca> How to deal with deletings thinks if they are referenced from more than one place?
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<lisp123> What do you mean by referenced from more than one place?
<ebrasca> lisp123: I have read the ones inside the source code, the tutorials.lisp !
<ebrasca> lisp123: I have tags , a image may have many tags!
<lisp123> ebrasca: Yes they are very good. It had an issue with some un-updated code which took me ages to figure out :(
aksej[m] has left #commonlisp [#commonlisp]
<lisp123> So do you want to delete a certain tag from all images?
<ebrasca> Yes
<ebrasca> It leaves things like #<TAG DESTROYED> !
<ebrasca> I don't like them
<lisp123> Hmmm I'd have to look into it further. I'll do a mock example when I have some time. I am thinking to look at clear-class-indices
<lisp123> Are your tags stored as classes or are they simply values within a list that is stored in a slot for the image class?
<ebrasca> They are classes managed by bknr!
<lisp123> (If tags stored as values within a list in a slot), I was thinking of doing image-with-tags to get all images with the tag you want to delete, then update each image my removing tag from the tag list and updating the slot of the image
<lisp123> Yes, I suspect you have to have a look at clearing the indices for the tag class then
<lisp123> And re-building it
<lisp123> That should solve it (I remember doing that before)
<lisp123> You are aware that you can have hash-list-index? A slot with a hash-list index can have a list of keys for its value, and you can filter by any of the keys. This is analagous to the concept of adding tags to your data
Devon has joined #commonlisp
khrbt has quit [Ping timeout: 245 seconds]
<lisp123> ebrasca: Check out pages 25 & 26 of the pdf
<lisp123> You will have to play around with that to get what you are after
<Shinmera> etimmons: what would your preferred interface for hooking into Forge to provide missing libraries look like? Currently I have a warning condition on an unsatisfied dependency with a restart to either retry finding a match or using a provided one.
khrbt has joined #commonlisp
waleee has quit [Ping timeout: 245 seconds]
<ebrasca> lisp123: Can hash-list-index work with strings?
<lisp123> That's what I do :)
<ebrasca> It can't find my alias...
waleee has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
<lisp123> Example of hash-list-index
kevingal has quit [Remote host closed the connection]
nature has quit [Ping timeout: 250 seconds]
<lisp123> Now the issue I face is that you cannot have a hash table with a class as the key (without a custom hash table, which isn't too hard in and of itself), so if you are storing your tags as classes, you need to account for that. But tags as plain strings should work out the box
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
Nilby has quit [Ping timeout: 245 seconds]
cosimone has quit [Ping timeout: 245 seconds]
<ebrasca> tags can have aliases and implications!
<ebrasca> They can't be just strings!
<Josh_2> I think you can use something like (class-of ..) as the key?
<Josh_2> Or class name
<Josh_2> or type-of
<Josh_2> (class-name (class-of ..))
<lisp123> Try defining tags as a list of attributes vs. a class & also add some logic outside of bknr to do lookups against aliases (e.g. an alias table to collect a list of tags that have the same alias)
<lisp123> Josh_2: Actually, I should retract my comment partially. As long as there are unique instances for each class and not duplicates, one can use them as hash-keys....problem is when one generates two classes separately that are the same content-wise but are stored as separate objects
cosimone has joined #commonlisp
kuler has joined #commonlisp
kuler has quit [Remote host closed the connection]
Lord_of_Life has quit [Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine]
amb007 has quit [Read error: Connection reset by peer]
tyson2 has joined #commonlisp
amb007 has joined #commonlisp
Lord_of_Life has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
molson__ has quit [Quit: Leaving]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
seere has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
klm2is has joined #commonlisp
selwyn has joined #commonlisp
klm2is has quit [Quit: Leaving]
selwyn_ has joined #commonlisp
Alfr has quit [Quit: Leaving]
azimut has quit [Ping timeout: 276 seconds]
selwyn has quit [Ping timeout: 252 seconds]
azimut has joined #commonlisp
rain3 has quit [Read error: Connection reset by peer]
rain3 has joined #commonlisp
rain3 has quit [Ping timeout: 260 seconds]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
tyson2 has joined #commonlisp
djuber has joined #commonlisp
katya has quit [Ping timeout: 252 seconds]
katya has joined #commonlisp
Devon has quit [Ping timeout: 265 seconds]
akoana has joined #commonlisp
<greyrat> When a value is shown as (:OBJ ("key" value) ...), what data structure it is? Can it be automatically turned into a hash table?
<White_Flame> what's the "..."? More (key val) pairs, or more :OBJ keywords in there, too?
<greyrat> More key-value pairs
<greyrat> I get from a JSON parser
Alfr has joined #commonlisp
<White_Flame> technically, the CDR of that list is an alist
<White_Flame> and the CAR is just an indicator of what "type" of alist it is, a json object in this case
<greyrat> Is it a "real object"? Or just a normal list?
<White_Flame> it's a normal list
<greyrat> What's the use of indicating its type then?
<greyrat> A poor man's type checking?
<White_Flame> there's probably (:OBJ (k v) (k v)...), (:ARRAY val val val ...), etc
<greyrat> Is there a JSON parser that just gives me CL datastructures? A hashmap with lists?
<Bike> cl-json can be configured to do that
<White_Flame> not sure, I haven't used them much. However, some let you configure how obj/array are accumulated
<White_Flame> the simple list structure is so that you can consume it and create your own desired datastructures
<Bike> yason parses json objects as hash tables by default, looks like
lisp123 has quit [Remote host closed the connection]
JeromeLon has quit [Quit: WeeChat 3.0.1]
<greyrat> Thanks, I will check them out.
lisp123 has joined #commonlisp
<greyrat> How do you inspect long string output in emacs slime/sly? sly elides them for me.
<greyrat> I am now writing them to temp files, but that is so cumbersome.
<Bike> well, slime doesn't elide anything by default. i'm kind of surprised sly does. are you sure it's not *print-length* or something?
<greyrat> Bike: It says: [sly-elided string of length 2643]
<Bike> huh.
<pve> An old codebase I used to work on used lists like that pervasively, and called them "attribute lists" or "ATLs", i.e. (person name "John" age 30 ...) where the car indicated the "type" of object the list represented
<pve> I always found them curious and wondered if it was a common thing back the 80's or 90's or so
<Bike> greyrat: ah, if you check the sly manual, you want slynk:*string-elision-length* and slynk:*slynk-pprint-bindings*
tfeb has joined #commonlisp
<akater[m]> pve: defstruct can implement structures this way if you ask for it.
<Bike> the example even shows how to make sly stop binding *print-length*
<pve> akater[m]: (:type list) gives me a list but it doesn't store the type anywhere..
<pve> if that's what you meant
<White_Flame> easily faked with (defstruct (foo (:type list)) (%type :foo) a b c)
<White_Flame> no type checking on struct accessors, but at least a type indicator is there
<greyrat> Bike: thanks, `(setf (cdr (assoc 'slynk:*string-elision-length* slynk:*slynk-pprint-bindings*)) nil)` worked.
<akater[m]> pve: Search clhs defstruct for “binop”
<pve> White_Flame: oh, that looks right
<pve> akater[m]: ok I see it now
<White_Flame> oh, :named
<White_Flame> no need to "fake" it
<pve> that's a new one for me :)
<White_Flame> still no typechecking on accessors, though
<White_Flame> (for the :named field, that is. still obv typechecks for it being a list)
<pve> I sometimes feel the clhs is a fractal of information
donovanquixote has quit [Remote host closed the connection]
tfeb has quit [Quit: died]
molson has joined #commonlisp
tyson2 has quit [Ping timeout: 265 seconds]
tyson2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
waleee has quit [Ping timeout: 245 seconds]
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
waleee has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
shka has quit [Ping timeout: 245 seconds]
CptKirk has quit [Quit: Client closed]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
Lord_of_Life_ is now known as Lord_of_Life
lisp123 has joined #commonlisp
amb007 has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
lisp123 has quit [Ping timeout: 245 seconds]
winning-luser has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
hayley has quit [Changing host]
hayley has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
<greyrat> does CL have a nil-p function?
Qwnavery has joined #commonlisp
<pve> null
pve has quit [Quit: leaving]
gaqwas has joined #commonlisp
gioyik has joined #commonlisp
Devon has joined #commonlisp
cosimone has quit [Remote host closed the connection]
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
tyson2 has joined #commonlisp
selwyn_ has quit [Read error: Connection reset by peer]
rgherdt__ has quit [Ping timeout: 252 seconds]
hendursaga has joined #commonlisp
hendursa1 has quit [Ping timeout: 276 seconds]
gaqwas has quit [Ping timeout: 252 seconds]
ebrasca` has joined #commonlisp
ebrasca has quit [Ping timeout: 245 seconds]
makomo_ has quit [Ping timeout: 252 seconds]
makomo has quit [Ping timeout: 245 seconds]
notzmv has quit [Ping timeout: 252 seconds]