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>
karlosz has quit [Quit: karlosz]
<aeth> stylewarning: oh, you did that? Shouldn't you be typeerror instead of stylewarning, then?
<stylewarning> ;-)
dre has joined #commonlisp
karlosz has joined #commonlisp
karlosz has quit [Client Quit]
random-nick has quit [Ping timeout: 260 seconds]
lisp123 has joined #commonlisp
gioyik has quit [Quit: WeeChat 3.1]
lisp123 has quit [Ping timeout: 260 seconds]
pjb has quit [Ping timeout: 252 seconds]
Zianic has quit [Ping timeout: 250 seconds]
Oladon has joined #commonlisp
edgar-rft has quit [Quit: Leaving]
dre has quit [Quit: Leaving]
Devon has quit [Ping timeout: 252 seconds]
Qwnavery has joined #commonlisp
gaqwas has quit [Ping timeout: 265 seconds]
Qwnavery has quit [Quit: WeeChat 3.2]
kakuhen has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.2]
Fare has quit [Ping timeout: 260 seconds]
CrashTestDummy has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 260 seconds]
Devon has joined #commonlisp
<beach> Good morning everyone!
<Devon> Good evening beach
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
robin has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
robin has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
waleee has quit [Ping timeout: 260 seconds]
Fare has joined #commonlisp
igemnace has joined #commonlisp
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
robin_ has joined #commonlisp
robin has quit [Ping timeout: 260 seconds]
semz has quit [Ping timeout: 260 seconds]
<Devon> https://directory.FSF.org lists Emacs CL, Gnu CL and SBCL listed but not ABCL, CCL, Clasp, CLISP nor ECL. Perhaps these unlisted maintainers would like to provide a blurb for the directory.
robin_ has quit [Ping timeout: 260 seconds]
robin has joined #commonlisp
semz has joined #commonlisp
molson__ has joined #commonlisp
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 276 seconds]
molson_ has quit [Ping timeout: 252 seconds]
gaqwas has joined #commonlisp
Fare has quit [Ping timeout: 260 seconds]
Bike has quit [Quit: Lost terminal]
igemnace has quit [Remote host closed the connection]
Fare has joined #commonlisp
Fare has quit [Ping timeout: 260 seconds]
Oladon has quit [Quit: Leaving.]
robin has quit [Remote host closed the connection]
contrapunctus has left #commonlisp [#commonlisp]
robin has joined #commonlisp
contrapunctus has joined #commonlisp
nature_ has quit [Ping timeout: 260 seconds]
NeoCron has joined #commonlisp
robin has quit [Ping timeout: 260 seconds]
robin has joined #commonlisp
Doraemon has quit [Ping timeout: 252 seconds]
lisp123 has joined #commonlisp
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
d4ryus has quit [Quit: WeeChat 3.2]
d4ryus has joined #commonlisp
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
pve has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
Lycurgus has joined #commonlisp
d4ryus has quit [Quit: WeeChat 3.2]
d4ryus has joined #commonlisp
shka has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
Inline has quit [Quit: Leaving]
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
cosimone has joined #commonlisp
cosimone` has joined #commonlisp
cosimone has quit [Ping timeout: 252 seconds]
hendursa1 has joined #commonlisp
hendursaga has quit [Ping timeout: 276 seconds]
abraham has quit [Quit: The Lounge - https://thelounge.chat]
abraham has joined #commonlisp
scymtym_ has joined #commonlisp
scymtym has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 260 seconds]
cosimone` has quit [Ping timeout: 265 seconds]
<fiddlerwoaroof> stylewarning: congratulations!
<fiddlerwoaroof> I guess there's not a #coalton yet :)
<fiddlerwoaroof> hi everyone!
amb007 has joined #commonlisp
<beach> Hello fiddlerwoaroof.
<fiddlerwoaroof> I've been writing a lot less lisp than I'd like
<beach> That's not good.
<stylewarning> fiddlerwoaroof: thanks! Maybe when communication needs hit a threshold a channel can be made.
<fiddlerwoaroof> stylewarning: have you thought at all about the representation of phantom type variables?
<stylewarning> Just a little but not much
amb007 has quit [Ping timeout: 260 seconds]
<fiddlerwoaroof> It's one of my favorite tricks available with a nominal type system to help propagate information with no runtime cost
amb007 has joined #commonlisp
<stylewarning> fiddlerwoaroof: yeah I agree
<fiddlerwoaroof> But, it's a bit weird that there's no way to introspect the missing variable (afaict)
<fiddlerwoaroof> Reifying them somehow would also let the constraints pass through untyped code
kstuart has joined #commonlisp
ln43 has joined #commonlisp
kakuhen has quit [Read error: Connection reset by peer]
froggey has quit [Quit: leaving]
froggey-1 is now known as froggey
kstuart has quit [Quit: rcirc on GNU Emacs 28.0.50]
kstuart has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
cage has joined #commonlisp
amb007 has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
ln43 has quit [Quit: ln43]
Inline has joined #commonlisp
Inline has quit [Quit: Leaving]
cage has quit [Remote host closed the connection]
cage has joined #commonlisp
pjb has joined #commonlisp
cosimone has joined #commonlisp
cosimone` has joined #commonlisp
frgo has quit [Remote host closed the connection]
cosimone has quit [Ping timeout: 252 seconds]
frgo has joined #commonlisp
cosimone` has quit [Remote host closed the connection]
cosimone has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
lisp123_ has joined #commonlisp
lisp123 has quit [Ping timeout: 260 seconds]
cosimone has quit [Remote host closed the connection]
Inline has joined #commonlisp
Inline has quit [Remote host closed the connection]
random-nick has joined #commonlisp
cosimone has joined #commonlisp
lisp123 has joined #commonlisp
lisp123_ has quit [Ping timeout: 245 seconds]
Inline has joined #commonlisp
<jcowan> You can discuss Coalton here, or of course in #lisp: it is a Lisp, so on-topic there
kstuart has quit [Ping timeout: 252 seconds]
cosimone has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
gaqwas has joined #commonlisp
Lycurgus has joined #commonlisp
yitzi has joined #commonlisp
<shka> jcowan: coalton looks like a very useful thing for certain applications
<shka> if i understand correctly, the whole point is to employ static type safety
<shka> it is not about the performance whatsoever
gaqwas has quit [Remote host closed the connection]
hendursa1 has quit [Quit: hendursa1]
gaqwas has joined #commonlisp
hendursaga has joined #commonlisp
cosimone has joined #commonlisp
igemnace has joined #commonlisp
perrierjouet has joined #commonlisp
lisp123 has quit [Quit: Leaving...]
Fare has joined #commonlisp
waleee has joined #commonlisp
kulernil has quit [Remote host closed the connection]
kulernil has joined #commonlisp
aleamb has joined #commonlisp
kulernil has quit [Remote host closed the connection]
kulernil has joined #commonlisp
abrantesasf has joined #commonlisp
<Josh_2> Good afternoon everyone
Inline has quit [Quit: Leaving]
<beach> Hello Josh_2.
Fare has quit [Ping timeout: 260 seconds]
karlosz has joined #commonlisp
sjl has joined #commonlisp
Alfr has quit [Ping timeout: 265 seconds]
mariari has quit [Quit: WeeChat 3.2]
mariari has joined #commonlisp
frgo has quit [Quit: Leaving...]
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
sander has quit [Quit: So long! :)]
sander has joined #commonlisp
frgo has joined #commonlisp
frgo has quit [Client Quit]
khrbt_ has quit [Ping timeout: 260 seconds]
Lycurgus has quit [Quit: Exeunt]
khrbt has joined #commonlisp
Alfr has joined #commonlisp
lisp123 has joined #commonlisp
karlosz has quit [Quit: karlosz]
<lisp123> Is there a optimal way to create a hash table with a custom test function, without defining your own hash function to go alongside the test condition?
<lisp123> I can't imagine there is..
<beach> No, no programming system can guess a hash function from an equality test.
<lisp123> Thought so, thanks
<pjb> lisp123: what do you mean by "optimal"?
<pjb> You can create a hash-table with a test function AND a hash function. Note that sxhash is provided, but 1- it's not generic, 2- it's not necessarily good for your objects, 3- it's not used by CL hash-tables (or at least, it's implementation dependent whether it's used or not).
<lisp123> Unfortunately I do not have a hash function
<pjb> If by "optimal" you mean with minimal programmer effort, then you can create a hash-table as a wrapper with a custom test and hash-function using cl:hash-table to avoid having to re-implement everything.
<pjb> lisp123: then, perhaps you have all the keys in advance? There are algorithms to create perfect hash-functions given a known list of keys.
gaqwas has quit [Remote host closed the connection]
<lisp123> No, unfortunately not
<pjb> Then, as beach said, the answer is no.
<lisp123> Issue is I want to match (1 * 3) to any list where (1 2 3), (1 4 3), etc.
<lisp123> Thanks, thought so
<pjb> Oh, you want a pattern matcher!
gaqwas has joined #commonlisp
<pjb> Or you can write a wrapper computing the key: (defun get-my-key (list) (list (first list) (third list))) (setf (gethash (get-my-key (my-object-list object)) table) object)
<pjb> Using an 'equal cl:hash-table.
<lisp123> Unfortunately that was but an example
<lisp123> I equally want to be able to filter on (1 2 *) and so forth
<lisp123> I have a function which can match two lists and disregard any discrepancies where there is a *
<pjb> lisp123: if you have a finite number of combinations, you can have multiple entries in the hash-table.
<pjb> (dolist (combination (compute-keys object)) (setf (gethash combination) table) object)
<lisp123> That's a good idea
<pjb> You can use keys such as: (1 2 *) (1 * 3) (* 2 3)
<pjb> And since possibly each pattern can match several object, you'd rather use push than setf.
<pjb> (dolist (combination (compute-keys object)) (push object (gethash combination '()) table))
<pjb> or pushnew.
<lisp123> I would need to create an entry for each combination, yes?
<pjb> yes.
<lisp123> Thanks, that could work (up to a certain list size)
<pjb> Yes.
<pjb> Then if you have lists, or similarly structured keys, you could have a tree of hash-tables.
<lisp123> I was thinking just that
<lisp123> The alternative is to memoize each call
<pjb> (defun select (key table) (cond ((null table) nil) ((null key) table) ((eql '* (first key)) (mapcan (lambda (table) (select (rest key) table)) (hash-table-elements table))) (t (select (rest key) (gethash (first key) table)))))
<pjb> (select '(1 * 2) table-of-tables)
<lisp123> (but that doesn't work if the hash table increases)
<lisp123> thanks - that might be the best way!
<lisp123> a tree of hash tables
<lisp123> That's very elegant code
karlosz has joined #commonlisp
<pve> I'm probably wrong, but is mapcan appropriate there?
yitzi has quit [Quit: Leaving]
<pjb> pve: it may lack a ensure-list somewhere but the idea is that when there's a *, there may be multiple hits. So we return a list of results.
<pjb> pve: of course we must ensure that all the lists are built in select.
<pve> pjb: alright, i see
sander has quit [Quit: So long! :)]
<pjb> pve: you're right, I need to copy the list build by pushnew, otherwise it's made circular…
markthom_ has joined #commonlisp
<pjb> with (setf select) you cannot have a wildcard. (* is just taken as a key, but it couldn't be retrieved alone with (select).
cosimone has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
ln43 has joined #commonlisp
<pve> pjb: that's great!
Bi[m] has joined #commonlisp
<lisp123> pjb: Thanks!
<ln43> hi all: is there an updated version of AIMA (4th edition) using CL?
sander has joined #commonlisp
Oladon has joined #commonlisp
hexology has joined #commonlisp
vats has joined #commonlisp
test_user has joined #commonlisp
<pjb> ln43: yes, it's called PAIP.
<pjb> PAIP = Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp
<ln43> ok... i was starting reading paip but aima is the recommended book for AI looking around
<ln43> anyway ok... i will try to read both but is better start from only one to avoiid any possible confusion
<ln43> but looking at the contents of PAIP is not almost the same as AIMA4e ... at least all the algorithms are not included
<pjb> It would have been too big to include all of them. And so, they're left as an exercise for the reader.
<pjb> Have fun!
<ln43> ok, I was asking just to know if there was an interest in the CL community to have the code available for further exploration using M-. and M-, that is the approach i'm currently using
<pjb> ln43: the code for paip is available.
<ln43> yes i was looking to that too
<_death> AIMA is very different from PAIP, but both have CL source code associated with them.. I don't know about the fourth edition specifically
<ln43> ok but there is no code for AIMA4e available
<ln43> only implementations in other languages
<_death> are you aware of this?
<ln43> it's not full-featured as the aima-other-language
<_death> maybe you can take it as an exercise to update it
<ln43> yes i'm aware since i would try to learn something
<pjb> Oh! This aima-lisp is implemented by Norvig too.
<ln43> yes according to the first edition of the book printed in the 1995
<pjb> Well, eventually Norvig turned to Python, for the money in it, so obviously he didn't maintain the lisp code for the newer editions.
<ln43> ok, but look how many mantainers there are, it's not only him
<pjb> Indeed. Now you can fork, contribute, and send a PR, but somehow I doubt it'd be merged soon.
<pjb> At least it's MIT-licensed.
<Josh_2> How do you open the inspector in SLIME? Normally I just click on an object in sly and it opens up.
<ln43> only 1 contributor to only port all that is contained in https://github.com/aimacode/aima-pseudocode is not enough
<ln43> it's a full time job ... for some months
<ln43> for only 1 experienced person... and for a learner maybe 1 year or more
<_death> ln43: this would make for a good way to learn
<_death> ln43: if it takes some months, so be it..
<ln43> yes but the pseudo code version adheres to the last version of the book
<ln43> i suppose
ln43 has quit [Quit: Connection closed]
nature_ has joined #commonlisp
lisp123 has quit [Quit: Leaving...]
shka has quit [Ping timeout: 265 seconds]
taichi has joined #commonlisp
mariari has quit [Ping timeout: 260 seconds]
test_user has quit [Ping timeout: 252 seconds]
Inline has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
Devon has quit [Ping timeout: 252 seconds]
joe_mad has joined #commonlisp
Oladon has quit [Quit: Leaving.]
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life has joined #commonlisp
joe_mad has left #commonlisp [ERC (IRC client for Emacs 27.1)]
Fare has joined #commonlisp
Fare has quit [Ping timeout: 260 seconds]
vats has quit [Ping timeout: 260 seconds]
Fare has joined #commonlisp
akoana has joined #commonlisp
john-a-carroll has joined #commonlisp
john-a-carroll has quit [Ping timeout: 252 seconds]
Fare has quit [Ping timeout: 265 seconds]
pve has quit [Quit: leaving]
cosimone has joined #commonlisp
cosimone has quit [Remote host closed the connection]
White_Flame has quit [Remote host closed the connection]
kulernil has quit [Write error: Connection reset by peer]
hendursaga has quit [Write error: Connection reset by peer]
gxt has quit [Write error: Connection reset by peer]
azimut_ has quit [Remote host closed the connection]
cosimone has joined #commonlisp
White_Flame has joined #commonlisp
Lycurgus has joined #commonlisp
gaqwas has quit [Ping timeout: 265 seconds]
kakuhen has joined #commonlisp
akoana has left #commonlisp [Leaving]
cosimone has quit [Ping timeout: 252 seconds]
random-nick has quit [Ping timeout: 252 seconds]