jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
light_ is now known as light
Inline has quit [Ping timeout: 252 seconds]
dra has quit [Ping timeout: 240 seconds]
jon_atack has quit [Ping timeout: 244 seconds]
markb1 has quit [Ping timeout: 246 seconds]
fosskers has joined #commonlisp
aartaka has quit [Ping timeout: 250 seconds]
markb1 has joined #commonlisp
random-nick has quit [Ping timeout: 252 seconds]
tyson2 has joined #commonlisp
dinomug has joined #commonlisp
lucasta_ has joined #commonlisp
bird_ has quit [Ping timeout: 244 seconds]
bird_ has joined #commonlisp
ldb has joined #commonlisp
<ldb> get is pretty close to the real book now
Volt_ has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
habamax has joined #commonlisp
waleee has quit [Ping timeout: 245 seconds]
`Pixel_Outlaw has quit [Quit: Leaving]
ldb has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
zaymington has joined #commonlisp
habamax has quit [Remote host closed the connection]
pfdietz has quit [Quit: Client closed]
pfdietz has joined #commonlisp
enzutwo is now known as enzuru
enzuru has quit [Changing host]
enzuru has joined #commonlisp
habamax has joined #commonlisp
fosskers has quit [Ping timeout: 244 seconds]
danieli0 has joined #commonlisp
dbotton_ has joined #commonlisp
jcowan_ has joined #commonlisp
leo_song has joined #commonlisp
nimiux_ has joined #commonlisp
mal1 has joined #commonlisp
prokhor has quit [*.net *.split]
nimiux has quit [*.net *.split]
lieven has quit [*.net *.split]
jcowan has quit [*.net *.split]
leo_song_ has quit [*.net *.split]
dbotton has quit [*.net *.split]
danieli has quit [*.net *.split]
danieli0 is now known as danieli
jcowan_ is now known as jcowan
dbotton_ is now known as dbotton
prokhor has joined #commonlisp
habamax has quit [Remote host closed the connection]
habamax has joined #commonlisp
lucasta_ has quit [Ping timeout: 258 seconds]
msavoritias has joined #commonlisp
dinomug has quit [Remote host closed the connection]
pfdietz has quit [Quit: Client closed]
rtypo has quit [Ping timeout: 244 seconds]
msavoritias has quit [Ping timeout: 252 seconds]
jon_atack has joined #commonlisp
jon_atack has quit [Ping timeout: 245 seconds]
habamax has quit [Remote host closed the connection]
habamax has joined #commonlisp
rgherdt has joined #commonlisp
varjag has joined #commonlisp
pve has joined #commonlisp
habamax has quit [Ping timeout: 248 seconds]
igemnace has joined #commonlisp
msavoritias has joined #commonlisp
easye has quit [Remote host closed the connection]
easye has joined #commonlisp
habamax has joined #commonlisp
shka has joined #commonlisp
Inline has joined #commonlisp
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #commonlisp
msavoritias has quit [Ping timeout: 245 seconds]
dra has joined #commonlisp
dra has quit [Changing host]
dra has joined #commonlisp
msavoritias has joined #commonlisp
dra has quit [Ping timeout: 246 seconds]
igemnace has quit [Read error: Connection reset by peer]
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
dino_tutter has joined #commonlisp
igemnace has joined #commonlisp
davidbe has joined #commonlisp
beach` has joined #commonlisp
duuqnd has quit [Quit: ZNC 1.8.2 - https://znc.in]
duuqnd has joined #commonlisp
beach has quit [Ping timeout: 246 seconds]
dra has joined #commonlisp
dra has quit [Changing host]
dra has joined #commonlisp
beach` is now known as beach
rgherdt_ has joined #commonlisp
msavoritias has quit [Ping timeout: 256 seconds]
igemnace has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
rgherdt has quit [Ping timeout: 240 seconds]
dra has quit [Ping timeout: 256 seconds]
random-jellyfish has joined #commonlisp
igemnace has joined #commonlisp
msavoritias has joined #commonlisp
<random-jellyfish> So I'm working on an HDL simulator and I want to leverage the image save/reload functionality of common lisp. In the hardware industry it can be very useful to save the state of a simulation and then run different other simulations starting from that state. Because sometimes simulations are very slow and it can a few hours just to do the
<random-jellyfish> configuration of a chip model for example. So it's better to run that simulation once, save the image and then reload it and continue from there with different scenarios. But now I have a dilemma: should I save the simulation log messages in the heap or write them to a text file and restore the file descriptor when I reload the image? I would
<random-jellyfish> rather save them to ram because then simulations are much faster but the log can grow very large. Do common lisp implementations save large heaps to the hard drive at run time? What would be the best way to store log messages in situations like this?
<Shinmera> I'm not aware of a lisp implementation that can dump an image without terminating the process.
<Shinmera> You also similarly need to terminate all threads, file descriptors, etc. and restore them on start yourself.
<random-jellyfish> terminating the process is not a problem, I'm okay with that
<random-jellyfish> the simulations will be single threaded
<random-jellyfish> I was just wondering if I can avoid terminating the log file descriptor by saving the text in the heap instead of writing it to a file
<random-jellyfish> the only issue is that it can grow very large, gigabytes or even more
<Shinmera> I guess. The problem will be GC pressure resulting from that. SBCL for instance has a hard heap size limit that is configured on startup.
<Shinmera> It can't (currently) dynamically grow that limit on demand.
habamax has joined #commonlisp
<random-jellyfish> I see, I guess that leaves me with restoring the file descriptor...it's not that big of a pain if I think about it
dnhester has joined #commonlisp
<Shinmera> If the log is append-only you could probably do things in a pretty not-terrible way though by just lazily managing the output FD.
davidbe has left #commonlisp [#commonlisp]
davidbe has joined #commonlisp
<dnhester> Hi, what's the best way to loop over a list of strings add some other strings at for each one and concatenate all of them in the end? I can do a regular loop with append and concatenate, I'm just wondering about a lisp way of doing it that's efficient and not just another language written in lisp...
<random-jellyfish> dnhester you want to join them with a separator?
<beach> dnhester: (loop for string in strings collect string collect some-other-string)
<dnhester> I want to add a new line before, then the string, then some computed string based on the string itself, then a comma
<dnhester> beach thanks will try it now
<beach> So (loop for string in strings collect (format nil "~%") collect string collect (compute-string string) collect ",")
<dnhester> it's the collect which get's me, I'm not used to it, about to read the docs about it
<beach> It just accumulates things until the loop is finished.
<dnhester> beach thanks again
<beach> Sure.
<dnhester> beach so in the end it'll be a list where every time we use collect it just adds an item to the list?
<beach> Correct.
dnhester has quit [Quit: Client closed]
dnhester has joined #commonlisp
<dnhester> got it, now it makes sense, thanks, it looked like magic to me beforehand. If I know the total number of elemenets in the final list, will it make it more efficient because it's like an array? or is it some linked list representation where adding has O(1)
<beach> It would typically use an O(1) technique for the accumulation.
<beach> But you should not probably not be concerned with performance at this point.
dnhester has quit [Ping timeout: 246 seconds]
kevingal has joined #commonlisp
Brucio-61 has quit [Ping timeout: 244 seconds]
dra has joined #commonlisp
dra has quit [Changing host]
dra has joined #commonlisp
scymtym has quit [Ping timeout: 246 seconds]
azimut has quit [Ping timeout: 246 seconds]
rgherdt_ has quit [Ping timeout: 246 seconds]
rgherdt has joined #commonlisp
random-nick has joined #commonlisp
rgherdt_ has joined #commonlisp
Brucio-61 has joined #commonlisp
rgherdt has quit [Ping timeout: 245 seconds]
notzmv has joined #commonlisp
random-jellyfish has quit [Quit: Client closed]
random-jellyfish has joined #commonlisp
karlosz has joined #commonlisp
donleo has joined #commonlisp
tyson2 has joined #commonlisp
random-jellyfish has quit [Quit: Client closed]
rgherdt_ has quit [Remote host closed the connection]
rgherdt_ has joined #commonlisp
jon_atack has joined #commonlisp
jon_atack has quit [Ping timeout: 240 seconds]
dino_tutter has quit [Ping timeout: 248 seconds]
thuna` has joined #commonlisp
micro has quit [Ping timeout: 256 seconds]
micro has joined #commonlisp
dra_ has joined #commonlisp
dra has quit [Ping timeout: 258 seconds]
pfdietz has joined #commonlisp
dra_ has quit [Ping timeout: 245 seconds]
habamax has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
yitzi has joined #commonlisp
dino_tutter has joined #commonlisp
rgherdt__ has joined #commonlisp
rgherdt_ has quit [Ping timeout: 240 seconds]
lucasta has joined #commonlisp
dnhester has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
Nixkernal has joined #commonlisp
igemnace has quit [Read error: Connection reset by peer]
jon_atack has joined #commonlisp
rogersm has joined #commonlisp
<dnhester> how can I pass to `(concatenate 'string (list "a" "b" "c"))` I have the list, but I don't know how to pass it as values, I googled destructuring but couldn't find an answer
<beach> (apply #'concatenate 'string <the-list>)
jon_atack has quit [Ping timeout: 240 seconds]
jmdaemon has quit [Ping timeout: 245 seconds]
<dnhester> beach ah thanks, is there no other way to break up the list into pass in values?
<dnhester> or is that the normal way?
<beach> This is the normal way.
<dnhester> ok, good to know, I thought I was missing some syntax, thanks!
<beach> Pleasure.
NotThatRPG has joined #commonlisp
<beach> dnhester: In the context of a macro, you can use the backquote notation to build the argument list at compile time, as in `(concatenate 'list ,@<the-list>), but then we are talking about building forms to evaluate rather than creating data from other data.
igemnace has joined #commonlisp
notzmv has quit [Ping timeout: 248 seconds]
cdegroot_ is now known as cdegroot
<beach> dnhester: But it sounds like your problem is better solved with a string stream.
<beach> ::clhs with-output-to-string
<ixelp> CLHS: Macro WITH-OUTPUT-TO-STRING
<beach> dnhester: Then you can use output functions like FORMAT to build your string, rather than first building a list of strings and then applying CONCATENATE to that list.
davidbe has quit [Quit: Connection closed for inactivity]
royaljelly has quit [Remote host closed the connection]
royaljelly has joined #commonlisp
scymtym has joined #commonlisp
jobhdez has joined #commonlisp
dnhester has quit [Quit: Client closed]
masinter has quit [Remote host closed the connection]
yitzi has quit [Remote host closed the connection]
AetherWind has joined #commonlisp
aartaka has quit [Ping timeout: 246 seconds]
aartaka has joined #commonlisp
Mandus is now known as mandus
akonai_ has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dino_tutter has quit [Ping timeout: 246 seconds]
akonai has quit [Ping timeout: 245 seconds]
akonai_ has quit [Client Quit]
akonai has joined #commonlisp
dnhester has joined #commonlisp
<dnhester> beach Colleen thanks, I'm just seeing your message, not sure why my IRC client keeps randomly disconnecting. Will look into those now
<beach> Pleasure.
rtypo has joined #commonlisp
<contrapunctus> dnhester: Colleen is a bot.
<dnhester> beach ok I just read the docs for the WITH-OUTPUT-TO-STRING and for some reason I just don't understand what it  says and how it relates to my question. Ok, I just re-read it, I think from the description I understood something but then the example they provide doesn't really help me. This is what I'm understanding, with-output-to-string will
<dnhester> execute a series of statements and each of their results is appended to the variable declared as the first parameter of the macro. Is that correct? Why is there an `s` in the example `(with-output-to-string (s fstr)`
<dnhester> contrapunctus haha thanks for letting me know hahahaha
<dnhester> sorry I wrote too many questions in one line, I just wrote it and read again and continued writing...
<beach> dnhester: You have to execute output forms like FORMAT.
<beach> dnhester: The s is a stream variable to be used with the output forms.
<beach> Er, let me check the page again, so I don't get the order wrong...
<beach> Right, so just do things like (with-output-to-string (stream) (format stream "hello"))
<beach> (with-output-to-string (stream) (format stream "~a" string) (format stream " ,") ...)
<dnhester> beach ok, so output forms like format meaning functions that will write to a stream?
<beach> Yes. I believe I used the word output functions.
<dnhester> beach so the s is not a variable that I'm providing to the macro, rather it's a name for creating a stream variable that I will use for all the output functions. Is that correct?
<beach> dnhester: It is a symbol that is not evaluated, and used by the macro WITH-OUTPUT-TO-STRING to bind to a stream that you can use in the body of the macro.
<dnhester> beach yeah I just didn't know that was the definition of output functions, functions that write to a stream
<beach> So the expansion of (with-output-to-string (stream) ...) is something like (let ((stream <create-a-string-stream>)) ... )
<dnhester> beach ok thanks, that was very educational, I feel like my understanding of this will help me in dealing with other things as well
<beach> dnhester: Maybe I forgot to mention #clschool. It seems you lack some fundamental knowledge of Common Lisp, and in #clschool there are people who hang out to help, and who are not present here.
<dnhester> ok thanks, I've read or gone through different guides and tutorials, but things were very much focused on how to do things without really explaining how things work and intricacies of the language, will try to ask questions in #clschool in the future, thanks!
<dnhester> beach Is there a good book that will focus on learning lisp in proper depth and not just introduce the language on how to do basic things? Practical Common Lisp and the Lisp Cookbook I feel don't really provide those thorough explanations that I'm lacking
<dnhester> beach I've been reading the hyper spec but there's a lot in the hyperspec itself that I just don't understand. Like for example here http://www.lispworks.com/documentation/HyperSpec/Body/m_w_out_.htm it lists "string---a string that has a fill pointer. " as the third argument but I don't see it in the signature above. Why is that and how would that
<ixelp> CLHS: Macro WITH-OUTPUT-TO-STRING
<dnhester> work? is that the `fstr` from the example? Why is it not in the signature? or what am I missing?
<dnhester> Maybe I should ask these questions in #clschool , will do it now
rainthree has joined #commonlisp
<beach> dnhester: The STRING is mentioned as the result of evaluating STRING-FORM.
<beach> dnhester: WITH-OUTPUT-TO-STRING is a macro so it takes unevaluated forms as its arguments.
dnhester has quit [Ping timeout: 246 seconds]
jobhdez has quit [Quit: Client closed]
dnhester has joined #commonlisp
<dnhester> beach got it, thanks!
lucasta has quit [Quit: Leaving]
donleo has quit [Ping timeout: 258 seconds]
NotThatRPG has joined #commonlisp
dnhester has quit [Ping timeout: 246 seconds]
jonatack has joined #commonlisp
dnhester26 has joined #commonlisp
dnhester has joined #commonlisp
rogersm has quit [Quit: Leaving...]
msavoritias has quit [Ping timeout: 252 seconds]
dnhester26 has quit [Remote host closed the connection]
dnhester has quit [Quit: Client closed]
msavoritias has joined #commonlisp
Pixel_Outlaw has joined #commonlisp
random-jellyfish has joined #commonlisp
prokhor has quit [Remote host closed the connection]
ldb has joined #commonlisp
dcb has joined #commonlisp
ldb has quit [Remote host closed the connection]
ldb has joined #commonlisp
Lycurgus has joined #commonlisp
kevingal has quit [Ping timeout: 258 seconds]
_cymew_ has joined #commonlisp
donleo has joined #commonlisp
dino_tutter has joined #commonlisp
Lycurgus has quit [Quit: Tschüss]
ldb has quit [Ping timeout: 246 seconds]
ldb has joined #commonlisp
waleee has joined #commonlisp
ldb has quit [Remote host closed the connection]
ldb has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alcor has joined #commonlisp
rainthree has quit [Ping timeout: 250 seconds]
msavoritias has quit [Remote host closed the connection]
defaultxr has quit [Ping timeout: 246 seconds]
defaultxr has joined #commonlisp
ldb has quit [Remote host closed the connection]
ldb has joined #commonlisp
ldb has quit [Ping timeout: 246 seconds]
pranavats has joined #commonlisp
defaultxr has quit [Ping timeout: 248 seconds]
tyson2 has quit [Remote host closed the connection]
rainthree has joined #commonlisp
anip has joined #commonlisp
azimut has joined #commonlisp
johnjaye has quit [Ping timeout: 252 seconds]
random-jellyfish has quit [Quit: Client closed]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
defaultxr has joined #commonlisp
rainthree has quit [Ping timeout: 245 seconds]
_cymew_ has quit [Ping timeout: 252 seconds]
AetherWind has quit [Quit: leaving]
tyson2 has joined #commonlisp
jonatack has quit [Ping timeout: 245 seconds]
jon_atack has joined #commonlisp
donleo has quit [Ping timeout: 245 seconds]
donleo has joined #commonlisp
Nixkernal has quit [Ping timeout: 260 seconds]
attila_lendvai has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
jmdaemon has joined #commonlisp
pve has quit [Quit: leaving]
alcor has quit [Read error: Connection reset by peer]
dra_ has joined #commonlisp
waleee has quit [Ping timeout: 244 seconds]
waleee has joined #commonlisp
rgherdt__ has quit [Quit: Leaving]
akoana has joined #commonlisp
tyson2 has quit [Ping timeout: 246 seconds]
prokhor has joined #commonlisp
dra_ has quit [Quit: Leaving]
dra has joined #commonlisp
dra has joined #commonlisp
attila_lendvai has quit [Ping timeout: 258 seconds]
anip has quit [Ping timeout: 245 seconds]
igemnace has quit [Read error: Connection reset by peer]
pfdietz has quit [Quit: Client closed]
zaymington has quit [Ping timeout: 248 seconds]
igemnace has joined #commonlisp
dra has quit [Quit: Leaving]
pfdietz has joined #commonlisp
johnjaye has joined #commonlisp
johnjaye has quit [Ping timeout: 246 seconds]
johnjaye has joined #commonlisp
tyson2 has joined #commonlisp
dino_tutter has quit [Ping timeout: 246 seconds]
habamax has joined #commonlisp
shka has quit [Ping timeout: 246 seconds]
lacedaemon has quit [Remote host closed the connection]
zaymington has joined #commonlisp
fosskers has joined #commonlisp
fe[nl]ix has joined #commonlisp
donleo has quit [Ping timeout: 256 seconds]
waleee has quit [Ping timeout: 252 seconds]
akoana has quit [Quit: leaving]
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life has joined #commonlisp
fosskers has quit [Ping timeout: 248 seconds]
zaymington has quit [Ping timeout: 248 seconds]
sjl has quit [Ping timeout: 245 seconds]