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/>
<hayley> I think I scribbled up a similar proposal before...
<ixelp> An immodest proposal for array-of-structs · GitHub
<aeth> the controversy of these sorts of things (I've made some proposals myself in the past on IRC) makes me think that a non-ARRAY thing actually has a chance of getting added
<pdietz> This was motivated by this youtube video:   https://www.youtube.com/watch?v=NAVbI1HIzCE
<ixelp> Practical Optimizations - YouTube
skin has joined #commonlisp
skin has quit [Remote host closed the connection]
skin has joined #commonlisp
occ has joined #commonlisp
<pjb> pdietz: you can do that trivially, by adding a dimension (the number of slots).
<pdietz> Sure.  That would not be a structure object to the rest of Lisp, though.  I suppose you could pull out a displaced-to vector, but I doubt that's efficient.
karlosz has quit [Quit: karlosz]
random-nick has quit [Ping timeout: 264 seconds]
<pjb> pdietz: eg. https://termbin.com/43dyq
<pjb> pdietz: you could provide two names or build to names, eg. points and point and expand a (defstruct point x y) and have functions to assign and copy between points entries and point structures.
<pjb> (let ((p (make-point))) (copy-points-to-point ps i j p) p) --> #S(point :x 42 :y 33)
<pjb> s/build to/build two/
<pjb> pdietz: you could use displaced arrays to map entries in the array to (defstruct (foo (:type vector)) …)
<pjb> and (:named nil)
skin has quit [Remote host closed the connection]
<pjb> but apparently, defstruct generates accessor that expect a simple-vector, so it doesn't work with displaced vectors. We have to generate our own accessors.
Posterdati has quit [Read error: Connection reset by peer]
beach` has joined #commonlisp
Posterdati has joined #commonlisp
beach has quit [Ping timeout: 246 seconds]
pdietz has quit [Ping timeout: 260 seconds]
occ has quit [Ping timeout: 268 seconds]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 276 seconds]
Lord_of_Life_ is now known as Lord_of_Life
occ has joined #commonlisp
ttree has joined #commonlisp
OlCe has quit [Ping timeout: 255 seconds]
tyson2 has quit [Remote host closed the connection]
occ has quit [Ping timeout: 268 seconds]
occ has joined #commonlisp
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
mzan has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
mzan has joined #commonlisp
terrorjack has joined #commonlisp
occ has quit [Ping timeout: 268 seconds]
kevingal has joined #commonlisp
cognemo has quit [Ping timeout: 260 seconds]
beach` is now known as beach
Devon77 has joined #commonlisp
Devon7 has quit [Ping timeout: 276 seconds]
occ has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
azimut has joined #commonlisp
markasoftware has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
markasoftware has joined #commonlisp
rtoy1 has joined #commonlisp
triffid has quit [Ping timeout: 255 seconds]
triffid has joined #commonlisp
chip_x has quit [Ping timeout: 260 seconds]
Devon77 has quit [Ping timeout: 276 seconds]
paul0 has joined #commonlisp
Lumine has joined #commonlisp
gxt__ has quit [Ping timeout: 255 seconds]
gxt__ has joined #commonlisp
ttree has quit [Read error: Connection reset by peer]
dcb has quit [Quit: MSN Messenger 3.8]
igemnace has joined #commonlisp
masinter has quit [Ping timeout: 276 seconds]
aartaka has joined #commonlisp
kevingal has quit [Ping timeout: 255 seconds]
shka has joined #commonlisp
frgo has quit [Ping timeout: 246 seconds]
pve has joined #commonlisp
lottaquestions has quit [Ping timeout: 260 seconds]
lottaquestions_ has joined #commonlisp
OlCe has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
LW has joined #commonlisp
aartaka has quit [Ping timeout: 255 seconds]
MajorBiscuit has joined #commonlisp
AmyMalik has quit [Quit: Bye Open Projects!]
aartaka has joined #commonlisp
occ has quit [Ping timeout: 276 seconds]
jmdaemon has joined #commonlisp
occ has joined #commonlisp
aartaka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 255 seconds]
aartaka has joined #commonlisp
Ellenor has joined #commonlisp
igemnace has quit [Remote host closed the connection]
igemnace has joined #commonlisp
rtoy1 has quit [Remote host closed the connection]
MajorBiscuit has quit [Ping timeout: 265 seconds]
MajorBiscuit has joined #commonlisp
jmdaemon has quit [Quit: ZNC 1.8.2 - https://znc.in]
jmdaemon has joined #commonlisp
Cymew has joined #commonlisp
<jackdaniel> just a short announcement: McCLIM repository is moved from github to codeberg (https://mcclim.common-lisp.dev/posts/Migration-to-Codeberg.html)
jmdaemon has quit [Quit: ZNC 1.8.2 - https://znc.in]
jmdaemon has joined #commonlisp
occ has quit [Ping timeout: 276 seconds]
jmdaemon has quit [Quit: ZNC 1.8.2 - https://znc.in]
jmdaemon has joined #commonlisp
jmdaemon has quit [Remote host closed the connection]
jmdaemon has joined #commonlisp
random-nick has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
aartaka has quit [Ping timeout: 255 seconds]
contrapunctus has joined #commonlisp
aartaka has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
Major_Biscuit has joined #commonlisp
AadVersteden[m] has joined #commonlisp
<AadVersteden[m]> I have an itch which I don't intend to act on, yet still: does SBCL have a fast way of doing matrix multiplication of numbers?
<jackdaniel> I don't think that there is anything bultin. there are libraries for that though - magicl is one, another is 3d-matrices (I think); there's also petalisp if you feel like getting adventurous
MajorBiscuit has quit [Ping timeout: 246 seconds]
<jackdaniel> as of the speed, I suppose it varies between solutions
<AadVersteden[m]> I think it'll be two two-dimensional bit-vectors so in reality I can do a bitwise and.
<AadVersteden[m]> jackdaniel: thank you, I'll read the readme and that should be enough to get this out of my head :D
Ellenor is now known as AmyMalik
Devon77 has joined #commonlisp
ec has quit [Ping timeout: 255 seconds]
ec has joined #commonlisp
jmdaemon has quit [Quit: ZNC 1.8.2 - https://znc.in]
jmdaemon has joined #commonlisp
Cymew has quit [Ping timeout: 256 seconds]
Brucio-61 has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 250 seconds]
rgherdt has joined #commonlisp
Brucio-61 has joined #commonlisp
scymtym has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
Brucio-61 has joined #commonlisp
jmdaemon has quit [Ping timeout: 264 seconds]
easye has quit [Ping timeout: 248 seconds]
aartaka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
notzmv has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
easye has joined #commonlisp
contrapunctus has joined #commonlisp
Guest29 has joined #commonlisp
masinter has joined #commonlisp
dcb has joined #commonlisp
Cymew has joined #commonlisp
Guest29 has quit [Quit: Client closed]
repeter` has joined #commonlisp
repeter has quit [Ping timeout: 250 seconds]
bjorkintosh has quit [Ping timeout: 276 seconds]
frgo has joined #commonlisp
frgo has quit [Ping timeout: 255 seconds]
frgo has joined #commonlisp
tevo has quit [Ping timeout: 248 seconds]
tevo has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
notzmv has quit [Ping timeout: 246 seconds]
contrapunctus has joined #commonlisp
karlosz has joined #commonlisp
frgo has quit []
aartaka has quit [Ping timeout: 255 seconds]
aartaka has joined #commonlisp
pdietz has joined #commonlisp
pdietz has quit [Quit: Client closed]
aartaka has quit [Ping timeout: 276 seconds]
aartaka has joined #commonlisp
Gleefre has joined #commonlisp
occ has joined #commonlisp
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
bjorkintosh has quit [Changing host]
tyson2 has joined #commonlisp
easye has quit [Remote host closed the connection]
X-Scale has joined #commonlisp
easye has joined #commonlisp
rtoy has joined #commonlisp
pdietz has joined #commonlisp
<mariari> what should I read to learn more about funcallable-standard-class and stadnard-generic-function?
markb1 has joined #commonlisp
<jackdaniel> minion: tell mariari about mop
<ixelp> CLiki: MOP
<beach> I suspect the AMOP is the only choice for the former.
<mariari> Yeah I've read through and started to implement the AMOP book in factor, but didn't get as far as funcallable-standard-class
<mariari> I really should learn how to utilize some of these patterns better
<jackdaniel> there isn't much to funcallable-standard-class - your class needs to have a metaclass funcallable-standard-class and then you set the function of an instance with set-funcallable-instance-function
<jackdaniel> other than that funcallables are instances like any other - you may add slots with accessors etc
<jackdaniel> to associate such funcallable with a symbol simply do (setf (fdefinition 'funciton) #<my-instance>)
<mariari> This seems great, this is a way to have hooks upon functional creation right?
<beach> mariari: Funcallable instances are more like generalized functions where you can store things in slots as jackdaniel points out.
<jackdaniel> you could use it for that I guess. another use case would be for example associating argument parsers with the function
<beach> mariari: For generic functions, those slots hold things like methods.
<mariari> beach: that does sound neat, I think an issue I had in the past was making languages I created interoperate with CL, I think the redefinition issue was on the CL side rather than the language side. But I can imagine using this for some things
<mariari> jackdaniel: that does seem like a good use for that, is there good uses for this in the wild, just saw it in my nyxt code, while writing an email responding to someone
<jackdaniel> I don't know, I have not used it in any open source code so far
<mariari> how did it work out for you in private code that you've worked on?
<jackdaniel> it works just fine
skin has joined #commonlisp
skin has quit [Remote host closed the connection]
kevingal has joined #commonlisp
skin has joined #commonlisp
rtoy has quit [Quit: rtoy]
chrcav has quit [Ping timeout: 268 seconds]
<beach> I think jackdaniel hinted about associating a parser with the function. CLIM does this for commands, so that would be one use for funcallable standard objects.
<jackdaniel> currently we keep parsers in hash tables, but switching commands to be funcallable-standard-instances would be nice
<jackdaniel> we could then encapsulate all important information with the function
<beach> Exactly.
<beach> And I use host funcallable standard objects to hold SICL generic functions during bootstrapping.
rtoy has joined #commonlisp
<scymtym> context for the CLIM related idea: https://irclog.tymoon.eu/libera/%23clim?around=1625838614
<beach> scymtym: I would even argue that its the only right way to do it. Then the hash table wouldn't have to be weak, for instance.
<jackdaniel> these hash tables are associated with command tables
<scymtym> beach: the thing i liked most about implementing commands as funcallable instances was replacing the huge generated parser functions
<jackdaniel> so if the command is removed from the command table then parsers are also removed (i.e there is no need for weak keys or values)
<beach> jackdaniel: I see.
<jackdaniel> generally what scymtym says, that would reduce complexity (at the expense of slightly violating the specification)
<beach> scymtym: How does funcallable standard objects simplify that aspect?
Major_Biscuit has quit [Ping timeout: 246 seconds]
<beach> s/does/do/
Major_Biscuit has joined #commonlisp
aartaka has quit [Ping timeout: 276 seconds]
aartaka has joined #commonlisp
<scymtym> beach: the funcallable object can store data about the parameters and interpret that data when parsing. i suppose this would work with regular functions as well but less conveniently. for example, if you want to reuse the same function for all commands, you cannot close over the parameter data. to be honest, i don't have this fresh in my mind since i implemented it some time ago
<beach> OK, thanks. I think I see.
<mariari> thanks for the link scymtym
<mariari> I will hopefully absorb all these ideas
X-Scale has quit [Quit: Client closed]
X-Scale has joined #commonlisp
X-Scale has quit [Client Quit]
jmdaemon has joined #commonlisp
aartaka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
X-Scale has joined #commonlisp
Cymew has quit [Ping timeout: 268 seconds]
skin has quit [Quit: Leaving.]
skin has joined #commonlisp
aartaka has quit [Ping timeout: 246 seconds]
skin has quit [Ping timeout: 252 seconds]
X-Scale has quit [Quit: Client closed]
jmdaemon has quit [Ping timeout: 246 seconds]
skin has joined #commonlisp
frgo has joined #commonlisp
random-nick has quit [Ping timeout: 250 seconds]
cage has joined #commonlisp
chrcav has joined #commonlisp
pdietz has quit [Ping timeout: 260 seconds]
jmdaemon has joined #commonlisp
random-nick has joined #commonlisp
X-Scale has joined #commonlisp
<NotThatRPG> Lazy programmer question: Anyone have a comparison function for sorting s-expressions roughly lexicographically? I can definitely write one myself, but if someone's done it, I'd love to save myself the trouble
Brucio-61 has quit [Ping timeout: 260 seconds]
markb1 has quit [Quit: Leaving]
scymtym has quit [Ping timeout: 246 seconds]
masinter has quit [Ping timeout: 250 seconds]
Brucio-61 has joined #commonlisp
<jackdaniel> (curry #'every #'<*) or something
occ has quit [Ping timeout: 246 seconds]
scymtym has joined #commonlisp
attila_lendvai has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
occ has joined #commonlisp
rgherdt_ has joined #commonlisp
rgherdt has quit [Ping timeout: 260 seconds]
<NotThatRPG> @jackdaniel: Is <* a thing?
Krystof has quit [Ping timeout: 248 seconds]
Major_Biscuit has quit [Quit: WeeChat 3.6]
<NotThatRPG> I was thinking this would involve some fussy choices about when to use string-< and when < since the latter doesn't generalize over strings, and thinking about what to do when comparing lists and atoms (I'd prefer the latter come first). Not so?
* NotThatRPG suspects he actually wrote this at least once, but doesn't have it any more
<Bike> i don't think there's any obviously right way to compare a string and a number, or what have you. depends on what you need for your application
<Bike> that's where <* comes in, i imagine
<White_Flame> especially where you have for instance 0 and "0"
<White_Flame> or "FOO" vs FOO
<Bike> or FOO vs (#\F "O" #(#\O))
pdietz has joined #commonlisp
amoroso has joined #commonlisp
masinter has joined #commonlisp
<NotThatRPG> Bike: I am just looking for something that is lexicographic-ish -- I'd like to make a list of s-expressions easier for a human (particularly a debugger) to read, so it would be nice to make it something like library order, but it's not hugely important.
<NotThatRPG> It would probably be enough to have numbers all come before symbols, strings or lists, symbols and strings sorted with string-<= , lists last, and sorted recursively.
<NotThatRPG> Just so that one could eyeball one of these lists and not go far wrong
<NotThatRPG> Handy for symbolic computing applications.
<NotThatRPG> where s-expressions represent logical formulas
<NotThatRPG> s/formulas/literals/
Gleefre has quit [Remote host closed the connection]
attila_lendvai has quit [Ping timeout: 250 seconds]
szkl has joined #commonlisp
Bike has quit [Ping timeout: 248 seconds]
morganw has joined #commonlisp
tyson2 has joined #commonlisp
Bike has joined #commonlisp
Bike has quit [Remote host closed the connection]
Bike has joined #commonlisp
Bike has quit [Remote host closed the connection]
pdietz has quit [Ping timeout: 260 seconds]
jmdaemon has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
amoroso has quit [Quit: Client closed]
rgherdt has joined #commonlisp
rgherdt_ has quit [Ping timeout: 265 seconds]
amoroso has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
Inline has joined #commonlisp
kenran has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 28.2]
jmdaemon has joined #commonlisp
aartaka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
kevingal has quit [Ping timeout: 276 seconds]
attila_lendvai has joined #commonlisp
X-Scale has quit [Quit: Client closed]
Inline has quit [Quit: Leaving]
aartaka has quit [Ping timeout: 264 seconds]
aartaka has joined #commonlisp
mingus has quit [Quit: mingus]
Bike has joined #commonlisp
pve has quit [Ping timeout: 248 seconds]
pve has joined #commonlisp
Devon777 has joined #commonlisp
aartaka has quit [Ping timeout: 246 seconds]
Devon77 has quit [Ping timeout: 265 seconds]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
aartaka has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 268 seconds]
amoroso has quit [Ping timeout: 260 seconds]
akoana has joined #commonlisp
LW has quit [Quit: WeeChat 3.6]
yottabyte has quit [Quit: Connection closed for inactivity]
LW has joined #commonlisp
kenran has quit [Remote host closed the connection]
shka has quit [Ping timeout: 265 seconds]
skin has quit [Remote host closed the connection]
Krystof has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
OlCe has quit [Ping timeout: 246 seconds]
attila_lendvai has quit [Ping timeout: 276 seconds]
occ has quit [Ping timeout: 255 seconds]
<pjb> NotThatRPG: a Q&D such function is (lambda (a b) (string< (prin1-to-string a) (prin1-to-string b)))
<pjb> NotThatRPG: the problem is to order the classes of arguments.
semz has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
<pjb> NotThatRPG: and then, there are classes that don't have a natural order, eg. standard-object.
semz has joined #commonlisp
LW has quit [Quit: WeeChat 3.6]
OlCe` has joined #commonlisp
nij- has joined #commonlisp
<nij-> Hello :) I have a class PERSON, currently without a customized print-object method (so it's printed unREADbly). How do I modify its printer so that only when *print-readably* is true the effect I want takes over; otherwise we use the original printer?
jmdaemon has quit [Ping timeout: 268 seconds]
<Bike> (defmethod print-object ... (if *print-readably* (whatever) (call-next-method)))
<nij-> Thanks Bike. I will try it now.
<nij-> However, as I inspect the PRINT-OBJECT generic function, it seems that there's no method for PERSON yet. I'm not sure why call-next-method would work.
<Bike> the next-method is for standard-object or something
<whereiseveryone> hi does anyone know where the home for this library is now? https://gitorious.org/abnotation/midi
<ixelp> gitorious.org Git - abnotation:midi.git/summary
<pjb> nij-: because you would define this method: (defmethod print-object ((p person) stream) (if *print-readably* (whatever) (call-next-method)))
<Bike> next method means going farther up the class precedence list, not like, another method also specialized on the same classes
<pjb> whereiseveryone: it moved to gitlab. But it's a clone of another, IIRC, which is in quicklisp.
<pjb> whereiseveryone: https://gitlab.com/abnotation/midi
<ixelp> abnotation / Midi · GitLab
random-nick has quit [Ping timeout: 268 seconds]
<ixelp> Commits · master · abnotation / Midi · GitLab
<pjb> whereiseveryone: don't hesitate to contact me if you need help with this. pjb@informatimago.com
<nij-> Oh I see. Thank you Bike, pjb.
jmdaemon has joined #commonlisp
<whereiseveryone> pjb: Hi, what were you trying to say with this link? https://gitlab.com/abnotation/midi/-/commits/master?ref_type=heads
<ixelp> Commits · master · abnotation / Midi · GitLab
<whereiseveryone> Thanks for the update to the project repo link pjb
<pjb> whereiseveryone: so you may see what changes I made to the original library.
<whereiseveryone> Oh ok
<whereiseveryone> Is this repo still official? https://framagit.org/abnotation/midi
<ixelp> abnotation / Midi · GitLab
<pjb> whereiseveryone: as a fork, yes, it is.
<whereiseveryone> Or I should ignore it and use the gitlab one?
<pjb> whereiseveryone: I keep them in sync.
<whereiseveryone> My use case is that I want to package this library for Guix
<whereiseveryone> https://guix.gnu.org/
<ixelp> GNU Guix transactional package manager and distribution — GNU Guix
<whereiseveryone> Which one should I use for the source?
<whereiseveryone> My goal is then to package gsharp
akoana has quit [Quit: leaving]
pve has quit [Quit: leaving]
<whereiseveryone> And then write a musical score with it after that nerd snipe
<pjb> I think you can take it from gitlab.
<whereiseveryone> Ok
<whereiseveryone> will do
<whereiseveryone> thnx
<whereiseveryone> Can gsharp be used to replace the GUI in OpenMusic?
<whereiseveryone> OpenMusic is not as open as it can be: https://github.com/openmusic-project/openmusic/issues/25
<ixelp> Is it possible to develop and compile openmusic without Lispworks? · Issue #25 · openmusic-project/openmusic · GitHub
<pjb> gsharp has its own file formats and editing concepts. I doubt you can easily use it as a replacement for just the GUI of OpenMusic. At least, you'd have to write format converters.
morganw has quit [Remote host closed the connection]
nij- has quit [Ping timeout: 246 seconds]
nij- has joined #commonlisp
nij- has left #commonlisp [#commonlisp]