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/>
trisquelbeginner has joined #commonlisp
NotThatRPG has joined #commonlisp
trisquelbeginner has quit [Quit: Leaving.]
LW has quit [Quit: WeeChat 3.6]
Lord_Nightmare2 has joined #commonlisp
djuber` has joined #commonlisp
Posterdati has quit [Ping timeout: 255 seconds]
djuber has quit [Ping timeout: 255 seconds]
Lord_Nightmare has quit [Ping timeout: 255 seconds]
anddam has quit [Ping timeout: 255 seconds]
Lord_Nightmare2 is now known as Lord_Nightmare
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
neon has joined #commonlisp
<char[m]> hey lisp. for trivial-with-current-source-form, it takes a &rest (it is a macro). What should I do if a have a list of sources that I want to inject into it?
anddam has joined #commonlisp
Posterdati has joined #commonlisp
pmwals09 has joined #commonlisp
occ has joined #commonlisp
jeosol has joined #commonlisp
pmwals09_ has joined #commonlisp
<NotThatRPG> char[m]: Maybe make a paste? Not sure what the macro does or what you are trying to do with it.
<ixelp> GitHub - scymtym/trivial-with-current-source-form: Helps macro writers produce better errors for macro users
pmwals09 has quit [Ping timeout: 255 seconds]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<char[m]> FORM and FORMS are evaluated. I have a variable called sources I want FORM to be (first *sources*) that's easy. I want FORMS to be (rest *sources*) that's where I am stuck.
<Catie> Is it within a macroexpander or just a function body?
<char[m]> In a function that is called from a macro
<char[m]> outside of the quasiquote, so it should be called at macroexpand time.
<Bike> char[m]: the underlying operators don't support that
<Catie> You could do it with eval, I guess
<char[m]> Bike: would you consider adding a version that takes a list? perhaps trivial-with-current-source-forms (plural s). Catie how so?
<char[m]> Bike: It looks like they are just list* together anyway.
<Catie> (eval `(with-current-source-form ,forms ...)), unless I'm really misunderstanding how eval works
<Bike> char[m]: you'd have to convince the sbcl maintainers as well
random-nick has quit [Ping timeout: 246 seconds]
<Bike> it would probably have to be a new operator, too. using just one fixed form is pretty much the norm
pmwals09_ has quit [Remote host closed the connection]
kevingal has joined #commonlisp
pieguy128 has quit [Ping timeout: 248 seconds]
NotThatRPG has joined #commonlisp
kevingal has quit [Ping timeout: 248 seconds]
<char[m]> It seems like it works in dynamic scope, so that should work for my case.
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #commonlisp
<char[m]> using it in dynamic scoped worked very well for me.
triffid has joined #commonlisp
<Bike> not sure what you mean by that, but i'm glad it worked
samedi has quit [Quit: Leaving]
pmwals09 has joined #commonlisp
pmwals09 has quit [Client Quit]
pieguy128 has joined #commonlisp
<char[m]> Bike: like this: https://paste.debian.net/1273438/
<ixelp> debian Pastezone
<char[m]> Going back to our previous conversation about `the`, sbcl is telling me to add &optional to disallow values like (values fixnum &optional).
occ has quit [Ping timeout: 248 seconds]
pranavats has joined #commonlisp
bilegeek has joined #commonlisp
ixelp has quit [Ping timeout: 252 seconds]
gilberth has quit [Ping timeout: 256 seconds]
ixelp has joined #commonlisp
ixelp has quit [Ping timeout: 255 seconds]
ixelp has joined #commonlisp
<Bike> oh, sure, it has dynamic scope
occ has joined #commonlisp
occ has quit [Ping timeout: 255 seconds]
occ has joined #commonlisp
azimut_ has quit [Ping timeout: 255 seconds]
frgo has joined #commonlisp
frgo has quit [Ping timeout: 255 seconds]
occ has quit [Ping timeout: 255 seconds]
occ has joined #commonlisp
mrcom_ has joined #commonlisp
mrcom has quit [Read error: Connection reset by peer]
waleee has quit [Ping timeout: 268 seconds]
brettgilio has quit [Read error: Connection reset by peer]
occ has quit [Ping timeout: 248 seconds]
occ has joined #commonlisp
shka has joined #commonlisp
kenran has joined #commonlisp
masinter has quit [Ping timeout: 248 seconds]
igemnace has joined #commonlisp
masinter has joined #commonlisp
occ has quit [Ping timeout: 255 seconds]
ec has quit [Ping timeout: 255 seconds]
ec has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
rgherdt has joined #commonlisp
bilegeek has quit [Quit: Leaving]
frgo has joined #commonlisp
frgo has quit [Read error: Connection reset by peer]
frgo has joined #commonlisp
<qhong_> is it a good idea to extend ASDF so that it knows how to fetch the source of a system? e.g. extending prepare-op?
qhong_ is now known as qhong
attila_lendvai_ has joined #commonlisp
pve has joined #commonlisp
aartaka has joined #commonlisp
MajorBiscuit has joined #commonlisp
MajorBiscuit has quit [Client Quit]
MajorBiscuit has joined #commonlisp
LW has joined #commonlisp
masinter has quit [Ping timeout: 276 seconds]
markb1 has quit [Ping timeout: 248 seconds]
Inline has joined #commonlisp
markb1 has joined #commonlisp
selfish has quit [Ping timeout: 252 seconds]
<pjb> qhong: there's quicklisp for that.
tevo has joined #commonlisp
attila_lendvai_ is now known as attila_lendvai
<pve> Good morning! Here is my slime-chatgpt tool, in case anyone wants to play with it. It's pretty fun, although I'm not sure how useful it actually is. At least, I think a better prompt is needed.
<ixelp> GitHub - pve1/slime-chatgpt
<semz> If I put my email address as #.(concatenate 'string "foo" "@bar.com") into an ASDF system definition, is this going to cause problems? Are there widely used tools that rely on a lack of read-time evaluation?
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
quoosp has joined #commonlisp
<mfiano> No. Some people even read their entire README file into a string and dump it into :long-description at read time. The documentation renderers I have seen, all handle this as you would expect in this regard.
<jackdaniel> an eternal question of what seems to work and what is semantically sound
<mfiano> Fair enough.
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
<Shinmera> semz: why would you, though
<mfiano> He probably wants to protect against email address crawling bots
<semz> indeed
<Shinmera> I plaster my email everywhere and don't have a spam problem, so idk.
<Shinmera> But seeing such a thing in an ASD *will* make me actively angry at you.
<semz> Will you angrily send me spam? :p
<mfiano> It doesn't take much to get a Lisper to be angry at your code, though, so that isn't saying much.
les has quit [Ping timeout: 252 seconds]
<Shinmera> mfiano: It's saying a bit more coming from someone that tries to wrangle ASDF far more often than she'd like.
<phoe> we shall see what happens once my-awesome-project.asd contains (defmacro define-asd-project ...) (define-asd-project ...)
les has joined #commonlisp
<jackdaniel> mfiano: that was funny, made me chuckle actually
<mfiano> (defun my-reverse (list) (declare (optimize (speed -1))) list)
<Shinmera> Anyway, I don't actually know if Redist handles that case nicely.
<Shinmera> Since Redist does *not* evaluate ASDs.
<Shinmera> Though I think it also currently doesn't extract the maintainer field at least.
occ has joined #commonlisp
<semz> hm, that does complicate things
<Shinmera> Also your solution would not protect against stuff that *does* evaluate it and compile the info into static documents, like quickdist and quickref
<Shinmera> Which will just publish your email plain.
<semz> that's a good point actually
<Shinmera> So my advice is: don't bother. The spam is not an issue. Or: use standard human-readable "encryption" like my AT example DOT com
<jackdaniel> #.(read-png "email.png")
occ has quit [Ping timeout: 260 seconds]
<Shinmera> Looks like Redist chomps through (find-file-systems "(asdf:defsystem fooey :maintainer #.(concatenate 'string \"foo\" \"@bar.com\"))") just fine. It treats doesn't evaluate the reader expression, substituting a dummy object instead.
<Shinmera> *-treats
<jackdaniel> and here I am wondering what redist is; when I'm at my computer I'll type something like "shinmera redist" -- I have a vague idea what it may be
<ixelp> GitHub - Shirakumo/redist: A toolkit to handle the Shirakumo Quicklisp dist.
<phoe> jackdaniel: my algorithm is more or less (and (or "shinmera" "shirakumo") "redist")
<Shinmera> that just constant folds to "shinmera"
<jackdaniel> so if the system is not part of shirakumo quicklisp dist then it is not a subject of redist - you are safe semz ;)
<phoe> Shinmera: actually to "redist"
<jackdaniel> at first I thought it is "redis" and was wondering what redis has to do with common lisp
<Shinmera> phoe: Oh yeah.
<jackdaniel> but oh well, I have my own New Inventions to Handle
<Shinmera> jackdaniel: redist was made specifically so you can import the official quicklisp-projects meta and create your own clone of the official dist
<jackdaniel> yes, I believe Xach wrote something similar
<Shinmera> Since when Xach disappeared for a year I became somewhat worried about the continued support of the dist.
<jackdaniel> (and I think I saw a few other such projects, I'm guilty of one too but it was not published)
<Shinmera> And wanted to make something that's documented.
<Shinmera> ANd actually works
<jackdaniel> new-invention-handler, I call dips on that class name
* jackdaniel stops unnecessary banter on his part
karlosz has quit [Quit: karlosz]
azimut has joined #commonlisp
quoosp has quit [Ping timeout: 248 seconds]
neon has quit [Ping timeout: 260 seconds]
MajorBiscuit has quit [Quit: WeeChat 3.6]
Lycurgus has joined #commonlisp
quoosp has joined #commonlisp
karlosz has joined #commonlisp
<pjb> pve: thanks. This will be useful!
<pve> pjb: Great! I just added a more general slime-chatgpt-consult function.
<pve> keep in mind that the free version of chatgpt has a limit of around 30 queries per hour or so
<pjb> Yes. I'll have to get an apikey too.
<jackdaniel> I wonder how that plugin would comment the function defined by mfiano earlier as a joke (that with speed -1)
<mfiano> Maybe declare names a function shadowing CL:DECLARE in the current package, and thus, isn't picked up as a syntax form when parsing.
<mfiano> It could infact be mutating the list :)
Inline has quit [Quit: Leaving]
<mfiano> Well, it'd have to be a macro, but still a function.
MajorBiscuit has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
karlosz has quit [Quit: karlosz]
scymtym has quit [Ping timeout: 248 seconds]
Brucio-61 has quit [Ping timeout: 260 seconds]
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
attila_lendvai has quit [Ping timeout: 268 seconds]
dcb has quit [Quit: MSN Messenger 3.8]
attila_lendvai has joined #commonlisp
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Ping timeout: 276 seconds]
attila_lendvai_ has quit [Read error: Connection reset by peer]
karlosz has joined #commonlisp
Brucio-61 has joined #commonlisp
attila_lendvai has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
random-nick has joined #commonlisp
avocadoist has joined #commonlisp
karlosz has quit [Quit: karlosz]
scymtym has joined #commonlisp
<pve> jackdaniel: :) the comment reads as follows:
<pve> "The function 'my-reverse' is not actually reversing the input list, but rather it is just returning the same input list. This can be seen from the code where the list is just passed as it is with no manipulation or reversing being done. The 'declare' statement with the 'optimize' option suggests that the function is intentionally written to perform poorly on purpose, likely just for demonstration or
<pve> testing purposes."
<jackdaniel> thanks :) apparently it didn't pick the joke (yet!)
<phoe> I thought that -1 is meant that speed is going in reverse direction so returning the list would actually return it backwards
<jackdaniel> right, that was a joke, congrats!
<jackdaniel> s/a/the/
* phoe yays!
<pve> jackdaniel: yeah, it sees there's something fishy, but can't quite light the bulb
<jackdaniel> we should poke jokes at it while we still can (;
<pve> its wrath will be all the worse later
<mfiano> :)
occ has joined #commonlisp
Lycurgus has quit [Ping timeout: 276 seconds]
pranavats has joined #commonlisp
szkl has joined #commonlisp
repeter`` has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
repeter` has quit [Ping timeout: 268 seconds]
Guest2932 has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
Guest2932 has quit [Quit: Client closed]
ec has quit [Ping timeout: 255 seconds]
ec has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.8]
perrierjouet has joined #commonlisp
Lycurgus has joined #commonlisp
Lycurgus has quit [Changing host]
Lycurgus has joined #commonlisp
Lycurgus has quit [Quit: Exeunt: personae.ai-integration.biz]
Lycurgus has joined #commonlisp
<semz> Might as well post it here after asking about its .asd file: If you're looking for a strict and fast Deflate decompressor, you may find https://semelz.de/software/decompress.html interesting
<ixelp> A defensive and fast Deflate decompressor in pure Common Lisp
<semz> not in QL yet obviously
tyson2 has joined #commonlisp
kevingal has joined #commonlisp
<Lycurgus> somehow 'pure' sounds funny with CL
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
n0den1te has joined #commonlisp
<Bike> Can I use babel to write the utf8 encoding of a string into a byte stream? I don't see any obvious way.
waleee has joined #commonlisp
<jackdaniel> perhaps with flexi streams?
<Bike> ah, yeah, looks like that can do it i think. thank
<Bike> s.
<jackdaniel> sure
<semz> There was some talk about a streaming API in Babel itself a while ago but it would have required refactoring and didn't go anywhere yet afaik
<yitzi> There is a "use-bom" slot in the encoders. Not sure what happened to the babel docs though.
aartaka has quit [Ping timeout: 276 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
<ixelp> ELS 2023, Amsterdam - European Lisp Symposium
waleee has quit [Ping timeout: 276 seconds]
Lycurgus has quit [Ping timeout: 255 seconds]
pranavats has joined #commonlisp
<beach> Great!
Lycurgus has joined #commonlisp
repeter`` is now known as repeter
Lycurgus has quit [Quit: Exeunt: personae.ai-integration.biz]
masinter has joined #commonlisp
jfloren has quit [Ping timeout: 255 seconds]
jfloren has joined #commonlisp
<splittist> semz: awesome!
eddof13 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
<NotThatRPG> Function type declaration confusion: I tried to declare an FTYPE as being (GENERIC-FUNCTION <args> <values>) and both Allegro and SBCL reject this saying that (GENERIC-FUNCTION ...) is not a function type. But the spec seems to say that a generic-function is a type-specifier and that generic-function is a subtype of function. What am I doing wrong?
<NotThatRPG> oh, I think I see that it's just an atomic type specifier. So do we declare function types of generic functions just using "FUNCTION"?
<NotThatRPG> SBCL does not seem to like giving FTYPEs for functions defined with DEFGENERIC
<ixelp> SBCL error message - Pastebin.com
n0den1te has quit [Ping timeout: 276 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
<Equill> Bike: FWIW, I've implemented encoding of strings (and other structures) into a usocket stream, in case that's of use as prior art. I'm no Edi Weitz, but the code is in https://github.com/equill/neo4cl/tree/main/src
<ixelp> neo4cl/src at main · equill/neo4cl · GitHub
attila_lendvai has joined #commonlisp
<Equill> Look in `bolt.lisp` for `defmethod send-packstream` for transmitting a vector of octets, and in `packstream-encoding.lisp` for `defmethod encode-string` for, well, how I encode UTF-8 strings into said vector of octets. The context is a database driver.
jfloren has quit [Ping timeout: 276 seconds]
perrierjouet has quit [Quit: WeeChat 3.8]
kenran has quit [Remote host closed the connection]
perrierjouet has joined #commonlisp
<Bike> Equill: Thank you
<Bike> NotThatRPG: just proclaim the (function ...) type - knowing it's a generic-function won't really help anything
<Bike> NotThatRPG: though as you might be able to divine from that message, the function type might not help either, since sbcl pretty much assumes generic-functions can return whatever, i think
<NotThatRPG> Bike: I can't tell -- does it also assume that the parameters can be whatever?
<NotThatRPG> This was sort of as much for documentation as for anything else...
<NotThatRPG> But I would have liked the runtime type checks when optimizing SAFETY
<Bike> kind of looks like it, but it might be worth checking with the sbcl folks, if this isn't in the manual (and i don't think it is)
<Bike> even if it does ignore the proclamation, i think it's probably wrong for it to complain about it
<Bike> btw, if you want both the extended type and the generic-function, you can do (and generic-function (function ...)), awkward looking as that is
X-Scale has joined #commonlisp
neon has joined #commonlisp
X-Scale has quit [Ping timeout: 260 seconds]
MajorBiscuit has quit [Quit: WeeChat 3.6]
notzmv has quit [Ping timeout: 248 seconds]
cage has joined #commonlisp
cage has quit [Client Quit]
aartaka has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
igemnace has quit [Quit: WeeChat 3.8]
waleee has joined #commonlisp
morganw has joined #commonlisp
quoosp has quit [Ping timeout: 276 seconds]
jeosol has quit [Quit: Client closed]
mariari has quit [Quit: WeeChat 3.8]
mariari has joined #commonlisp
Colleen_ has joined #commonlisp
Colleen_ has quit [Client Quit]
aartaka has quit [Ping timeout: 255 seconds]
dcb has joined #commonlisp
neon has quit [Ping timeout: 268 seconds]
quoosp has joined #commonlisp
neon has joined #commonlisp
<Bike> is there a way to get ASDF to tell me where it's looking for systems? Like the results of all the source registry whatevers.
<Bike> quicklisp local-projects has stopped working and I don't know what's up (and yes i did register-local-projects)
rayer has quit [Ping timeout: 248 seconds]
<mfiano> Not exactly the answer to your question, but #'ql:where-is-system should help.
Brucio-61 has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 248 seconds]
<Bike> well in this case it's more like where isn't system
<mfiano> :)
<mfiano> Quicklisp sort of side-steps a lot of ASDF's search mechanisms...
rayer has joined #commonlisp
<Catie> #'asdf:system-source-directory maybe?
<mfiano> That should be more appropriate here, yes.
<mfiano> But it will probably error in his case, since it can't be found.
<Catie> Yeah, sorry about that
<mfiano> We really do need better tools in this regard. I feel this pain all too often.
<mfiano> Bike: Also be sure to check that local-projects/system-index.txt actually references the new systems after r-l-p.
<Catie> I've always had an easier time using just bare ASDF than Quicklisp, I don't think I have anything in my local-projects anymore
<Catie> That's probably just a matter of what I chose to get familiar with though, honestly
Brucio-61 has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waleee has quit [Ping timeout: 248 seconds]
waleee has joined #commonlisp
kevingal has quit [Ping timeout: 268 seconds]
eddof13 has joined #commonlisp
masinter has quit [Ping timeout: 276 seconds]
<NotThatRPG> Bike: Yes, there is a way to do this...
<NotThatRPG> But it's complicated because If I recall correctly QL adds its own search method.
<NotThatRPG> Also there's a lot of indirection in the code for the search. I think if you use the DSL configuration then you should be looking at the contents of asdf/source-registry:*source-registry*
<NotThatRPG> Unfortunately, that doesn't tell you much about how entries get in there, and how ASDF is interpreting your DSL expressions.
<NotThatRPG> You can also, of course, look at ASDF:*CENTRAL-REGISTRY*
<NotThatRPG> But as far as the Quicklisp-specific configuration, I got nothin'
<jasom> Hmm, on SBCL, is it possible to atomically set/clear a bit in an element of a (simple-array sb-ext:word (*))? Those are available for atomic incf/decf but not CAS...
<Bike> NotThatRPG: yeah, i found *source-registry* but mostly i'd like to see where this configuration is coming from. oh well.
<jasom> Actually, is writing to a bit-vector on SBCL thread-safe? That might be an option too.
rogersm has joined #commonlisp
<NotThatRPG> Bike: I have been meaning to get this done for years. The process of ASDF configuration is quite opaque, and it doesn't help that ASDF does some configuration as it's loading, based on environment variables, which means it's tricky to set up tracing before it's too late.
<NotThatRPG> Also a lot of the code that does this stuff is in anonymous lambdas, meaning it would require some refactoring to make it possible to use TRACE.
shka has quit [Ping timeout: 276 seconds]
* NotThatRPG knows it's not a good excuse
Lycurgus has joined #commonlisp
<Bike> eh, i get it
neon has quit [Ping timeout: 276 seconds]
occ has quit [Ping timeout: 248 seconds]
chip__ has joined #commonlisp
chip_x has quit [Ping timeout: 268 seconds]
Lycurgus has quit [Quit: Exeunt: personae.ai-integration.biz]
rogersm has quit [Quit: Leaving...]
<jasom> Not surprisingly, it does not appear that aref on a bit-vector is thread-safe in sbcl; any suggestions for logically implementing a lockless bit-vector on sbcl given that CAS doesn't work on vectors of words?
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shka has joined #commonlisp
LW has quit [Quit: WeeChat 3.6]
morganw has quit [Remote host closed the connection]
karlosz has joined #commonlisp
shka has quit [Ping timeout: 268 seconds]
neon has joined #commonlisp