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>
Josh_2 has quit [Quit: ERC (IRC client for Emacs 27.1)]
<hexology> i can imagine a few languages-that-must-not-be-named, but the partially applied function make me think it's the one named after a mathematician's first name that doesn't have a lot of parentheses
igemnace has quit [Ping timeout: 240 seconds]
igemnace has joined #commonlisp
nij- has joined #commonlisp
<nij-> Hi! I have imported maxima into a CL repl following the guide (https://github.com/calyau/maxima/blob/master/INSTALL.lisp). However, it opens a maxima repl in the lisp repl.. which didn't line up with what i was hoping for. I hoped to be able to evaluate the maxima expressions, and have the result returned as a lisp object that I can play with in the lisp repl. Does anyone know how to achieve that?
karlosz has quit [Ping timeout: 252 seconds]
Spawns_Carpetin- has joined #commonlisp
Spawns_Carpeting has quit [Ping timeout: 245 seconds]
<_death> akater[m]: note that it's not conforming to trace cl:mapcar
Spawns_Carpeting has joined #commonlisp
Spawns_Carpetin- has quit [Ping timeout: 268 seconds]
random-nick has quit [Ping timeout: 252 seconds]
doyougnu has quit [Remote host closed the connection]
Fare has quit [Ping timeout: 268 seconds]
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij- has quit [Ping timeout: 245 seconds]
nij- has joined #commonlisp
Spawns_Carpeting has quit [Ping timeout: 252 seconds]
Spawns_Carpeting has joined #commonlisp
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
<semz> Is the server having a hiccup?
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
<hayley> It helps to remember there are typically multiple servers on a IRC network.
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
<lotuseater> blubbediblubb
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
<lotuseater> maybe it's not algebraic and abstract enough
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ has joined #commonlisp
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
<akater[m]> Consider hypothetical alist accessor `alist-get`. `(setf (alist-get key place) new)` will not necessarily call `(setf place)`: when we push a new entry it must, but if we set an existing cdr, it might not. However, one might implement setf expander for `alist-get` so that `(setf place)` is always called. For example, I need this to guarantee calling relevant methods of the corresponding generic function `(setf place)`. Is there a
<akater[m]> special name for setf expansions that always do this? or for practice of defining such?
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ has joined #commonlisp
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
<lotuseater> something is going on ..
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
<pillton> (You can add "NICK" to erc-hide-list if you use ERC)
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
<lotuseater> I do.
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
<lotuseater> it seems to be over
<semz> how ominous
derelict has quit [Ping timeout: 240 seconds]
<lotuseater> indeed
ChanServ has quit [*.net *.split]
<mfiano> Didn't notice anything until I turned smart-filter off.
<mfiano> Odd indeed
<mfiano> smart-filter hides all non-message IRC commands, except for if that person speaks, then it will show their most recent join message, so you know what part of the conversation they have seen. I like it :)
srhm has quit [Quit: Konversation terminated!]
ChanServ has joined #commonlisp
<lotuseater> for what is this ghost command?
<mfiano> to regain control of your nick that hasn't pinged out yet. useful during network splits
<lotuseater> ahh
derelict has joined #commonlisp
Spawns_Carpeting has quit [Ping timeout: 252 seconds]
Spawns_Carpetin- has joined #commonlisp
Alfr has quit [Quit: Leaving]
<nij-> Hello, I'm trying to define addition for vectors. However, it doesn't seem that `&rest` keyword works well with defmethod: https://bpa.st/NIRQ
<lotuseater> how can i write a specialized version of + for just two arguments? i mean one that really optimizes on that
<Bike> nij-: yeah, you can only specialize on required arguments. the usual pattern is to define a binary operator, and then define vect-+ as reduce of it.
<Bike> lotuseater: (lambda (x y) (+ x y))
<nij_> :(
<lotuseater> I'm not nij- ^^
<lotuseater> okay :)
<Bike> yes, you happened to ask similar questions is all
<nij_> :D
<Bike> and just to be clear i wasn't being sarcastic or anything, that lambda is it. there's only so much optimization to be done with only that information, though. it will still have to work generically.
<Bike> nij-: by the way, you can write (lambda (x) (apply #'+ x)) as just #'+
<Bike> wait
<Bike> no you can't. sorry.
<nij_> Bike: in your method, vect-+ being a reduce is defined by defun, right?
<Bike> typing faster than i'm thinking
<Bike> yes
<lotuseater> cause i saw in a disassembly where a LOG function is used that it uses specialized versions when just called on two args
<nij_> :(
<nij_> That is really bad.
<nij_> defmethod should support &rest, no?
<Bike> the defun?
<nij_> Yeah
<lotuseater> ok thx :) no problem and i know you're serious
<lotuseater> yes
<Bike> being able to specialize on &rest would screw up a fair bit of the machinery, i'd say
<Bike> it might be doable, but you'd kind of be adding an extra dispatch step on arity
<lotuseater> oh noez
<nij_> I'm really sad. OK.. lemme think what I should do.
<Bike> defining it in terms of a binary operation also makes it possible to work with heterogenuous values
<Bike> like for just regular addition, you couldn't define (defmethod + (&rest (x anything)) ...) anyway, since you need to describe different behavior for fixnum+fixnum, rational+float, bla bla bla
<lotuseater> yes to much possibilities with that
prxq has joined #commonlisp
derelict has quit [Quit: WeeChat 3.2]
tyson2 has quit [Remote host closed the connection]
prxq_ has quit [Ping timeout: 240 seconds]
jeosol has quit [Quit: Ping timeout (120 seconds)]
<beach> Good morning everyone!
<pillton> nij_: Specialization store has support for it but be careful what you wish for. https://github.com/markcox80/specialization-store/wiki/Tutorial-2:-Optional,-Keyword-and-Rest-Arguments#rest-arguments
<mfiano> as does polymorphic-functions
jeosol has joined #commonlisp
kakuhen has joined #commonlisp
<lotuseater> being careful with wishes that are fullfilled by magical beings is a good idea in general :)
semz has quit [Ping timeout: 245 seconds]
semz has joined #commonlisp
Bike has quit [Quit: Lost terminal]
<aeth> if the question involves arrays and/or numbers, the answer is probably specialization-store
<aeth> unless there are similar libraries that I'm not aware of
Fare has joined #commonlisp
Qwnavery has joined #commonlisp
Qwnavery has quit [Quit: WeeChat 3.2]
gethuen has quit [Quit: Connection closed for inactivity]
rain3 has joined #commonlisp
lisp123 has joined #commonlisp
waleee has quit [Ping timeout: 240 seconds]
hendursaga has quit [Remote host closed the connection]
hendursaga has joined #commonlisp
waleee has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
les has quit [Quit: Adios]
les has joined #commonlisp
les has quit [Quit: Adios]
les has joined #commonlisp
Alfr has joined #commonlisp
Fare has quit [Quit: Leaving]
peterhil_ has quit [Ping timeout: 252 seconds]
Inline has quit [Quit: Leaving]
mister_m` has quit [Ping timeout: 272 seconds]
lisp123 has joined #commonlisp
robin has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
makomo has joined #commonlisp
Cymew has joined #commonlisp
lisp123 has joined #commonlisp
Spawns_Carpetin- has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Spawns_Carpeting has joined #commonlisp
gaqwas has joined #commonlisp
silasfox has joined #commonlisp
Spawns_Carpeting has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Spawns_Carpeting has joined #commonlisp
frgo has quit [Remote host closed the connection]
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123_ has joined #commonlisp
esb has joined #commonlisp
pve has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
shka has joined #commonlisp
totoro2021 has quit [Quit: WeeChat 2.8]
totoro2021 has joined #commonlisp
totoro2021 is now known as totoro
totoro has joined #commonlisp
totoro has quit [Changing host]
nij- has quit [Ping timeout: 245 seconds]
nij_ has quit [Ping timeout: 245 seconds]
gaqwas has quit [Ping timeout: 248 seconds]
hendursa1 has joined #commonlisp
hendursaga has quit [Ping timeout: 244 seconds]
lisp-newbie has joined #commonlisp
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
frgo has joined #commonlisp
PinealGlandOptic has quit [Ping timeout: 240 seconds]
wheelsucker has quit [Remote host closed the connection]
frgo has quit [Ping timeout: 245 seconds]
frgo has joined #commonlisp
<lisp-newbie> hi, good morning. I keep running into this issue. I need to pass in an argument to a function/class and it's one of a few possible values, and I can't find in the docs what the possible values are save from a few non exhaustive examples. I've tried going through the source code without much success. How can I find out the possible values? 2 examples I need now are :valid col-type values for this https://github.com/fukamachi/m
<lisp-newbie> ito#class-definitions and the second one is valid :type options for https://github.com/fisxoj/sanity-clause (could be this is the CLOS :type not sure)
<lisp-newbie> 2 examples I need now are :valid col-type values for this https://github.com/fukamachi/mito#class-definitions and the second one is valid :type options for https://github.com/fisxoj/sanity-clause (could be this is the CLOS :type not sure)
<lisp-newbie> respoted because the link broke...
lambdatheultimat has joined #commonlisp
JooTvora[m] has quit [Quit: Bridge terminating on SIGTERM]
hayley has quit [Quit: Bridge terminating on SIGTERM]
akater[m] has quit [Quit: Bridge terminating on SIGTERM]
icepic1984[m] has quit [Quit: Bridge terminating on SIGTERM]
katco has quit [Quit: Bridge terminating on SIGTERM]
Gnuxie has quit [Quit: Bridge terminating on SIGTERM]
alphapapa[m] has quit [Quit: Bridge terminating on SIGTERM]
dieggsy has quit [Quit: Bridge terminating on SIGTERM]
happy-dude has quit [Quit: Bridge terminating on SIGTERM]
rudi has quit [Quit: Bridge terminating on SIGTERM]
luis` has quit [Quit: Bridge terminating on SIGTERM]
etimmons has quit [Quit: Bridge terminating on SIGTERM]
loke[m] has quit [Quit: Bridge terminating on SIGTERM]
heretical_crypte has quit [Quit: Bridge terminating on SIGTERM]
Mrtn[m] has quit [Quit: Bridge terminating on SIGTERM]
Nilby has joined #commonlisp
loke[m] has joined #commonlisp
<beach> lisp-newbie: Apparently, Fukamachi is not very good with documentation, so information may be hard to find.
Gnuxie has joined #commonlisp
DiscontentNecess has joined #commonlisp
katco has joined #commonlisp
luis` has joined #commonlisp
dieggsy has joined #commonlisp
alphapapa[m] has joined #commonlisp
etimmons has joined #commonlisp
rudi has joined #commonlisp
Mrtn[m] has joined #commonlisp
happy-dude has joined #commonlisp
<lisp-newbie> beach is that the same for the other package as well? Since it looks like no one includes it in their docs, I thought it was a lisp thing...
JooTvora[m] has joined #commonlisp
akater[m] has joined #commonlisp
icepic1984[m] has joined #commonlisp
hayley has joined #commonlisp
<flip214> when loading my app and getting a compile error, the readtable and pretty printer settings are left modified - the readtable case, for example.
<beach> lisp-newbie: I don't use his stuff, so I don't know. This is just what I have heard, and it is apparently the same for other systems he created. I think there is a language problem, which would explain why he is reluctant to writing documentation in English.
<flip214> how can I find out which dependency is causing that? and why does ASDF not revert the readtable when handling an error?
<lisp-newbie> beach thanks, now I understand.. I was trying to use another person's package as well and had the same issue: :type options for https://github.com/fisxoj/sanity-clause
<beach> lisp-newbie: I am not sure what I am looking at there.
<beach> lisp-newbie: Your description was a bit cryptic because you mentioned passing an argument to a class, which doesn't make sense.
<lisp-newbie> beach just the same idea, there's a :type being passed in the classes, dunno if it's just the CLOS :type, and it's supposed to be one of a few options, I just wanted to know how can I find out what the possible options are. The package is for validating constraints on variables...
<lisp-newbie> beach sorry, don't know the right words to express things in lisp, too new...
<beach> lisp-newbie: Careful about terminology. Those are systems, not packages.
<lisp-newbie> beach thanks, system
<beach> lisp-newbie: The last link you gave is for the entire system. I am not willing to go through each source file to guess where this :TYPE argument is needed.
Qwnavery has joined #commonlisp
hayley has joined #commonlisp
hayley has quit [Changing host]
<beach> lisp-newbie: Is it a slot option in DEFCLASS?
<lisp-newbie> beach oh, exactly that was my question. Thanks, you just answered. I wanted to know if there's a standar way of finding out, maybe like describe for a symbol or class that would answer my question, going through the source is what I was doing... so basically there is no standard way and it's just a lack in their docs
* hayley wonders how they intend to apply the code of conduct when it is literally called sanity-clause.
<lisp-newbie> beach here yes: https://github.com/fisxoj/sanity-clause in mito
<lisp-newbie> in mito it's a macro that I think changes to a defclass
<lisp-newbie> yes, that's what it is
<lisp-newbie> beach here's the defclass version https://github.com/fukamachi/mito#deftable-macro for mito
<beach> lisp-newbie: I don't see a :TYPE argument there, and the other link you gave is to the entire sanity-clause system.
<hayley> There is a BNF diagram at the end of the Mito README which looks like it would describe the available column types, but the descriptions are far too vague.
<beach> lisp-newbie: Maybe it's better for someone else to help you. I am notorious for not understanding what the problem is, unless it is defined with great precision.
<lisp-newbie> beach for mito it's :col-type https://github.com/fukamachi/mito#deftable-macro and for sanity-clause it's :type https://github.com/fisxoj/sanity-clause
<hayley> So a col-type in the grammar is a keyword, a CONS cell with a keyword for a CAR and some argument list as the CDR, or a list of the form (OR <keyword> :NULL) where <keyword> is a keyword.
<lisp-newbie> beach just to know the valid options I can pass in for :col-type in mito, and :type in sanity-clause
<lisp-newbie> that is the clear problem definition
<hayley> Actually, the "Relationship" example would be invalid according to this grammar; (or (:varchar 128) :null) doesn't match any of those productions.
MichaelRaskin has quit [Ping timeout: 248 seconds]
<beach> lisp-newbie: It looks to me like they are slot options indicating the type that the slot value can take, in which case, you don't pass anything. Just make sure your initargs have the right type.
<lisp-newbie> beach thanks
<hayley> Then I checked the documentation for SxQL, which also does not describe what a column type would be.
<beach> I am sorry that I probably don't understand the issue here.
<shka> is bt:destroy-thread guaranteed to destroy thread?
<Nilby> lisp-newbie: The col-type in mito looks rather complicated and is spread through a few files, but generally reflects what it would be called in the database. Maybe one way to figure it out would be create columns of various types in the databse and see what a query returns them as.
<shka> under sbcl to be specifc
<lisp-newbie> beach thanks so much for trying! sorry i couldn't express it clearly enough
<lisp-newbie> hayley thanks, reading what you wrote now one sec while I think about it
<lisp-newbie> hayley yeah, thanks exactly what i've been doing
<hayley> My best guess is that the names would be the same as in SQL. But guessing and testing yourself aren't replacements for documentation.
<lisp-newbie> hayley found this for sanity-clause https://github.com/fisxoj/sanity-clause/blob/master/src/field.lisp and for mito I found this https://github.com/fukamachi/mito/blob/master/src/core/class/column.lisp which has a definition of table-column-info with a list
lisp123_ has quit [Remote host closed the connection]
<lisp-newbie> Nilby thanks good idea
lisp123 has joined #commonlisp
<hayley> What did that internet personality say? "This does not spark joy." or something like that.
<lisp-newbie> hayley haha yeah I thought I was missing something that was obvious and that's why it was lacking in the different projects' docs
<hayley> I don't think column.lisp has all the types you can use; doesn't SQL have a fair few number types?
<hayley> Still, funny name, as I started listening to The Damned again, and one of their songs is named "There ain't no sanity clause"...anyways.
<Nilby> I see keywords such as :int :integer :boolean (:varchar 100) :timestamp :timestamptz :bigint :serial :datetime :date, etc. But it looks like it supports lispy things like (or :null ..) too.
<hayley> What is more "lispy" about (or :null ...) than :boolean?
PinealGlandOptic has joined #commonlisp
<hayley> The whole database thing is un-Lispy if you ask me. Still, you get the impression you could write (or :integer :varchar) or something, so it would be more precise to write (nullable :integer) or something.
<Nilby> hayley: I just mean the or type combination, which db's don't usually do.
lisp123 has quit [Ping timeout: 256 seconds]
<hayley> Well, databases don't have arbitrary OR types. The library just understands the special cases of (or :null T) and (or T :null).
retropikzel has joined #commonlisp
<pjb> I'm sure Fukamachi is very good at documentation, written in Japanese…
lisp123 has joined #commonlisp
<hayley> Not much evidence of that either.
peterhil has joined #commonlisp
<pjb> lisp-newbie: as mentionned, the syntax for a col-type object is given in the grammar indicated on https://github.com/fukamachi/mito#class-definitions
<lisp-newbie> pjb yeah, the questions is what are the valid keywords, but I found it now, thanks! :)
<pjb> lisp-newbie: this means that a col-type will be a sexp, whic can be either a keyword (eg. :foo), a cons of the form (keyword . arg), a list of the form (or keyword :null) or a list of the form (or :null keyword).
<pjb> lisp-newbie: ok.
<Nilby> lack of documentaion seems to transcend natural language/cultural boundaries
<lisp-newbie> pjb thanks so much!
<pjb> The difficulty for this class of specifications/documentation, is that it makes reference to other systems that are interfaced. Here, with a database. So the col-type specifier is used to describe a type of column in the database used.
<pjb> lisp-newbie: depending on how constraining the lisp code is, it can just pass any value to the database, (and rely on the database to validate the keywords), or it can duplicate the work of the database, validating itself the keywords (but risking to refuse some new keyword a new version of the database would accept).
<pjb> lisp-newbie: so documentation wise you see the difficulty: the user should read both the documentation of the database and the documentation of the lisp module, to understand all the possibilities.
<lisp-newbie> pjb, yeah, I found the file where he has te keywords, I'm submitting a pull request and updating the docs
<pjb> (incf Nilby)
<pjb> lisp-newbie: great!
<lisp-newbie> pjb :D
<pjb> lisp-newbie: we often have the same problem with libraries that are (C)FFI layers over external C libraries.
nij- has joined #commonlisp
<lisp-newbie> pjb I hear, that sounds like a pain
<beach> pjb: Yeah, I hate that situation. We are presented with a library that is supposed to provide an abstraction layer, but in fact, to use it, one has to understand the software that the library itself uses.
<hayley> pjb: I had said this already, but it is a nearly useless grammar because it permits anything.
<Nilby> what's worse is some db's can have db instance specific column types, which used to require dynamicly loading custom C libs.
<hayley> Say, is :I-am-the-very-model-of-a-modern-major-general a column type?
<hayley> Or (:varchar 1 2 3 4 5)?
<hayley> I had also already said that the examples in the README also happily contradict this grammar, as (or (:varchar 128) :null) cannot be produced from the grammar.
<pjb> beach: this is one aspect of lisp, being so dynamic and runtimey, that it allows buidling conduit software that know very little about what is actually done.
<hayley> Isn't that the case for anything with sufficient polymorphism?
<pjb> I like to validate things, and to implement deterministic models, but this is not quite efficient either in programmer time or machine time. Conduits are often very lightweight.
<beach> pjb: Possibly. That's no excuse for not providing complete documentation, though.
<pjb> basically, copy-and-paste the database documentation (or the foreign library documentation).
<pjb> It would be good also to translate in terms of lisp, but this would be maintenance nightmares.
<pjb> If we could do that automatically, that'd be nice, but the source documentations often are not machine-readable or sufficiently formalized to be processed automatically (from one version to the other).
<hayley> Well, this is not a conduit if that is your definition; as the database and SQL language do not use a form like (or :null :varchar) anywhere.
<hayley> Thus it is necessary to properly specify the input grammar and how it is rewritten into a SQL type.
<lisp-newbie> my second question today, how can I create a class that has a itself as a slot, a simple example of this would be an object oriented linked list, where a node has a reference to another node
<lisp-newbie> I did this, and got some error saying that the class doesn't exist
<beach> lisp-newbie: Since Common Lisp is a dynamically typed language, a slot can contain anything.
<beach> lisp-newbie: Including an instance of the class that contains the slot.
<lisp-newbie> beach hm, ok, let me try again
<hayley> What is wrong with (defclass foo () ((bar :type foo))) if you really want to provide a type?
<lisp-newbie> beach I got invalid initialization argument error
<lisp-newbie> will make a pastebin for the code
<nij-> lisp-newbie: https://bpa.st/LJWA
<beach> hayley: It will be hard to provide an instance for the first instance. You would have to use the class prototype.
<nij-> (extent (extent (extent cup))) ;; => cup
<nij-> Oh you're dealing with meta-class?
<lisp-newbie> nij- thanks! will try it now
* nij- ducks
<lisp-newbie> nij- yeah, will that not work?
<lisp-newbie> I need it with two meta-classes...
<hayley> beach: Yes. One really should use a type specifier like (or foo null) to provide a base case (which I arbitrarily decided would be NIL).
<nij-> I dunno. I'm afraid. Try it out.
<lisp-newbie> beach https://pastebin.com/XyPj282T
<lisp-newbie> ok will try now
<nij-> A cup in itself in itself in itself in .. xD
<beach> lisp-newbie: How do you plan to provide a value for that slot for the first instance that you create?
<hayley> Okay, I suspect that sanity-clause isn't handling :type as gracefully as we hoped.
<beach> lisp-newbie: What is this obsession with the :TYPE slot option anyway.
<hayley> lisp-newbie: Did you read the error message?
<lisp-newbie> beach that's why it's :required NIL but yeah, could be I don't need to, I thought that was the validation, maybe it's something else..
<beach> lisp-newbie: Put a different way, this chain of old versions, is it infinite?
<hayley> It says "Invalid initialization argument: PREVIOUS-VERSION in call for class #<STANDARD-CLASS SANITY-CLAUSE SCHEMA:VALIDATED-METACLASS>."
<beach> lisp-newbie: If you provide NIL, then NIL is not of the right type according to your :TYPE.
<lisp-newbie> ok, thanks
<hayley> You put a close paren in the wrong place. Specifically, you ended the slot list just after the description of the ISSUE slot.
<nij-> Is it really true that I cannot use "&rest" while defining a method?
<nij-> (defmethod <+> (&rest (v vect)) ..)?
<beach> nij-: Of course you can.
<hayley> That is not true, but you cannot specialise on the type of non-mandatory arguments.
<nij-> :(
<hayley> (Nonetheless, the class of a &rest argument to me would always be LIST, perhaps either NULL or CONS, so it is not interesting in that instance.)
<beach> True that.
silasfox_ has joined #commonlisp
<nij-> Why not?
<beach> nij-: I think you were told how to do this.
<nij-> Why can't I specialize on types of the nonmandatory args?
<nij-> beach: to do __?
<Nilby> What would it call with no arguments?
<beach> nij-: A function that takes any number of arguments, such as + would treat zero or one argument specially. Then for the other cases, it would reduce a binary version of itself on the arguments.
<Nilby> But one can (defmethod <+> (v0 &rest (v vect)) ..) and work it out later in the method.
<beach> Nilby: That's not valid syntax.
silasfox has quit [Ping timeout: 240 seconds]
<beach> nij-: Then your binary version would have two required parameters, both of which can be specialized.
<nij-> beach: yeah, as a function it's fine. But method?
<beach> nij-: It doesn't make much sens to have a generic function that can take zero arguments. How would you determine which methods are applicable?
<nij-> hmm
<beach> nij-: So again, the way situations like that are handled, is that you make your function that can take an arbitrary number of arguments an ordinary function. Then the binary version is a generic function.
<beach> nij-: As I recall, Dylan does exactly that for things like +.
<nij-> I see.
<Nilby> beach: I was lazy and just copyied nij's without removing the default arg. You're so good at catching errors, you should write a compiler :)
<nij-> Who is Dylan?
<beach> nij-: A Scheme-like language defined by Apple some time ago.
<beach> Nilby: Nah, way too much work.
<Nilby> lol
<nij-> (Isn't sicl a compiler? written by beach?)
<beach> nij-: Nilby was making a joke.
<nij-> haha ok
<Nilby> nij-: opendylan.org
<beach> nij-: Speaking of which, SICL does it that way as well.
peterhil has quit [Ping timeout: 240 seconds]
PinealGlandOptic has quit [Quit: leaving]
<Nilby> dylan is vaguely like a CL-ish lisp-1 without the parens
<nij-> loklll seems cool but I cant live without parens xD
<nij-> I get you beach, thanks :)
<nij-> Now, I've defined a class 'vector-space. An instance of it is a vector space V. But V should contain vectors! How should I design the system so that its vectors are like objects in "the class V"?
<Nilby> nij-: I came to the same conclusion after working on it a number of year.
<nij-> Nilby: you mean "cant live without parens xD"?
<hayley> Well, I can't live without the interactive development. The syntax is secondary compared to that.
<Nilby> yes
<nij-> Ha hahaha I should write a song about it when I havtime.
<nij-> "CANT LIVE WITHOUT PARENS!"
<Nilby> Also it makes macro syntax very hard.
<beach> So RScheme defined at the University of Texas at Austin, is essentially Dylan with parentheses and interaction.
<nij-> hayley: parens are not just syntax.. they are.. everything (jk)
<beach> Or, rather, the way Dylan was before they came up with the syntax without parentheses.
<nij-> Now, I've defined a class 'vector-space. An instance of it is a vector space V. But V should contain vectors! How should I design the system so that its vectors are like objects in "the class V"?
<beach> nij-: (defclass vector-space () ((%vectors :initarg vectors :reader vectors)))
<beach> Done.
<flip214> nij-: V "has" vectors, so have a list of them?
<nij-> (a vector) \in (a vector space) \in (Categories of vector spaces) \in (2Cat of cats of vector spaces) \in ..
<beach> Then you supply a list of vectors to the initargs.
<flip214> beach: was faster than me, again ;)
<nij-> beach: But I want to treat vectors as CLOS objects.
<nij-> So I can later define methods on them.
<nij-> And in math it's often the case that we have a chain of belongingship.
<beach> (defmethod foo ((vector vector)) ...)
<nij-> A belongs to B belongs to C belongs to D .. etc
<beach> There is no "belongs to" relationship in Common Lisp.
<nij-> An object belongs to a class.
<nij-> beach: what's your class 'vector here?
<beach> So you have a chain of metaclasses?
<beach> clhs vector
<flip214> nij-: then you'll want a new class vector
selwyn has joined #commonlisp
<hayley> An object is an instance of a class, a class is an instance of a metaclass...
* nij- ducks .. I'm afraid of metaclasses i dunno what they are
<beach> classes of classes.
<hayley> A monoid in the category of endofunctors.
<nij-> Seems that I must go into that direction?
<hayley> (No, they're not.)
<nij-> is a monad
<hayley> Hah, found the category weenie.
<nij-> They are actually great.
<nij-> I'm writing a calculator for a special kind of category.
<nij-> But I have start with vector spaces and their duals, direct sums, and tensor products =_=
<nij-> Much harder than I expected.
<nij-> beach: I dunno if I should go into that direction.
<nij-> But see, for each vector space V, there is a vector addition <+>_V.
selwyn has quit [Remote host closed the connection]
<hayley> That said, I am not sure if categories are a good fit for being modelled with metaclasses. You might need to define another relation for categories.
<nij-> How do I arrange all of these?
selwyn has joined #commonlisp
<nij-> hayley: !! oh, I have to hack MOP, you think?
<nij-> It would be nice to have (defcategory ..) in CL.
<hayley> My previous statement suggested to me that I don't know if that would be appropriate.
<nij-> Sigh now I feel I need to at least know MOP to take care of this project.
<nij-> Or I just simulate the vectors poorly..
<hayley> Sometimes it seems like everyone my age with some interest in formal verification knows category theory, other than me.
<nij-> If you know what a group is, category theory isn't hard.
<nij-> That's the tip.
<nij-> (isn't hard to start*)
<hayley> Suppose I do know what a group is.
<nij-> hayley: To know what a group is, read "Definition and illustration" of https://en.wikipedia.org/wiki/Group_(mathematics)
<nij-> Feel free to query me if you want.
<nij-> beach: So in stumpwm too, there are many chains of belonging ships.
<hayley> I am aware of what a group is.
<nij-> window, frame, group, screen
<nij-> etc... and I believe they create each of them as CLOS classes separately
<hayley> Now, that is a relationship which is different to instance-of. A window is not an instance of a frame, a frame is not an instance of a group...
<nij-> but in each object, there are slots that keep track of their "masters"
<nij-> Yeah..
<nij-> OK, I think I will use the latter method, to keep it simple and stupid.
<hayley> nij-: I never asked to be messaged to be tutored on groups.
nij- has quit [Quit: Using Circe, the loveliest of all IRC clients]
random-nick has joined #commonlisp
lukego has joined #commonlisp
lisp-newbie has quit [Quit: This computer has gone to sleep]
flip214 has quit [Remote host closed the connection]
lisp123_ has joined #commonlisp
peterhil has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
lisp123_ has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123_ has joined #commonlisp
lisp123 has quit [Ping timeout: 268 seconds]
lisp123_ has quit [Ping timeout: 268 seconds]
igemnace has quit [Quit: WeeChat 3.2]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
cosimone has joined #commonlisp
tyson2 has joined #commonlisp
kakuhen has quit [Quit: Leaving...]
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
lisp123 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
lisp123 has quit [Ping timeout: 268 seconds]
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
cosimone has quit [Ping timeout: 258 seconds]
lisp123 has joined #commonlisp
Qwnavery has quit [Quit: WeeChat 3.2]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Qwnavery has joined #commonlisp
lisp123 has quit [Ping timeout: 248 seconds]
lisp-newbie has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
nij- has joined #commonlisp
<nij-> Why does such defmethod fail? https://bpa.st/Q4DA
amb007 has quit [Ping timeout: 252 seconds]
<hayley> You defined the generic function to take only one mandatory argument.
amb007 has joined #commonlisp
hhdave_ has joined #commonlisp
<nij-> Oh, I see indeed. Thanks :)
hhdave has quit [Ping timeout: 248 seconds]
hhdave_ is now known as hhdave
<jackdaniel> nij-: it is literally said in the error message
<hayley> The error message is a bit indirect still.
<Qwnavery> the quest of practical common lisp begins
<Qwnavery> x-x
<Qwnavery> 'tis daunting
<hayley> One has to know that first ENSURE-METHOD (at least that is what I think the name is) tried to find a method to replace first. And to make it very blatant, the error could have said "This lambda list has two required arguments, not one."
lisp123 has joined #commonlisp
<nij-> jackdaniel: Yeah, sorry. I didnt' know why that took only one argument.
<nij-> hayley's hint let me know that I have done something stupid before.
yitzi has joined #commonlisp
<jackdaniel> I'm just pointing out that "You defined the generic function to take only one mandatory argument" is semantically equivalent to the part "generic function ... takes 1 required argument" in the error message
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
lisp123_ has joined #commonlisp
<hayley> That is not really what I think of for it to "literally" appear in the error message.
<jackdaniel> well, luckily I was making a remark (if it were you then you'd be saying something you don't think ,)
<hayley> Actually, no, you are right. It is directly stated that the generic function is defined with one required argument.
lisp123 has quit [Ping timeout: 240 seconds]
<hayley> But it is only indirectly stated that the provided lambda list for the method has two required arguments. It is not a direct comparison in that way. And the error is phrased around finding a method, not defining a method.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Bike has joined #commonlisp
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
lisp-newbie has quit [Quit: This computer has gone to sleep]
lisp-newbie has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
anddam has joined #commonlisp
cage has joined #commonlisp
tyson2 has joined #commonlisp
Qwnavery has quit [Quit: WeeChat 3.2]
amb007 has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
lisp-newbie has quit [Quit: Leaving]
amb007 has joined #commonlisp
lambdatheultimat has quit [Quit: Leaving]
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
derelict has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
yitzi has quit [Quit: Leaving]
ec has joined #commonlisp
igemnace has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Vultyre has left #commonlisp [WeeChat 2.8]
attila_lendvai has joined #commonlisp
srhm has joined #commonlisp
attila_lendvai has quit [Ping timeout: 258 seconds]
amb007 has quit [Ping timeout: 268 seconds]
attila_lendvai has joined #commonlisp
amb007 has joined #commonlisp
Inline has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
attila_lendvai has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
cosimone has joined #commonlisp
amb007 has joined #commonlisp
silasfox_ has quit [Ping timeout: 240 seconds]
srhm has quit [Remote host closed the connection]
silasfox_ has joined #commonlisp
ec has joined #commonlisp
<lisp123_> Are there any good resources for learning and/or applying memoizing in Common Lisp?
<jackdaniel> the implementaiton is rather trivial
<lisp123_> jackdaniel: Yeah it appears most people simply store the result of the function calls
<lisp123_> I was thinking of storing all the steps to get there
<jackdaniel> I don't follow
<lisp123_> If I got from A ------> B and find the specific path that takes me from A to B
<lisp123_> (say there are 100 different paths)
<lisp123_> I don't want to simply store that I can go from A to B, I want to store the specific path that took me there
<jackdaniel> that does not sound like memoization
<lisp123_> Well I want both, so in the future, if I see A and need B, I have the solution, but I also have the "how"
<jackdaniel> if you want to see what code paths were used, then you look for a coverage scanner
Demosthe1ex has joined #commonlisp
<lisp123_> Oh I see, let me research that. Am I correct in saying that if I am recording the results of A -> B, that is memoization?
<lisp123_> (not the paths, just the result)
<jackdaniel> yes, memoization is a form of caching results of the function invocation
<lisp123_> I couldn't find anything online for coverage scanners, do you have a link?
<jackdaniel> to get it right you must ensure, that for the same value (memoization predicate wise) the function always returns the same results (i.e is referentially transparent)
<jackdaniel> sb-cover is one available for sbcl
<lisp123_> Yes, I agree
Demosthenex has quit [Ping timeout: 256 seconds]
nij- has quit [Remote host closed the connection]
<lisp123_> THat seems to be related to checking how much of code has been run in the test suite - correct?
<jackdaniel> sure
<lisp123_> I think I am after something different, but I will probably write it from scractch.
<lisp123_> (Just to remove any mystery, say I have to get B from '(1 2 3 (E (G B))) (say this is *list*), one would go something like (cdr (last (last *list*)))) - I probably made a mistake somewhere, but it gives the drift)
<lisp123_> So I want to store that path (cdr (last (last *list*)), which I will not know until runtime
silasfox_ has quit [Ping timeout: 258 seconds]
<lisp123_> So I think what I will do is go through each permutation & combination, pushing the operation to a stack for that path, and if I get to B, returning that stack to give the path
silasfox_ has joined #commonlisp
<Bike> are you talking about actually traversing a data structure, or are thes4e supposed to represent function calls?
<lisp123_> function calls
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
<_death> sounds like you want to compute and store a list like (last-elt last-elt second)
attila_lendvai has quit [Ping timeout: 258 seconds]
<lisp123_> _death: yes, that's my plan
attila_lendvai has joined #commonlisp
<lisp123_> So once I get to B, I return back (a) the list of functions that got there and (b) store both the fact that A -> B & the sequence of functions to do it
<lisp123_> So I guess its not really memoisation, since I know what I'm looking for, its just that I don't know if I will find it, so its memoising that A -> B is T + this is the steps
<lisp123_> or A -> B is NIL (B cannot come from A)
retropikzel has quit [Quit: Leaving]
<jcowan> shka: destroy-thread is a baaaad idea in any language, as it can leave data structure in an unstable state.
silasfox_ has quit [Quit: WeeChat 3.2]
<jackdaniel> lisp123_: I think that all that would be more comprehensible if you explain what you want to do on a slightly higher level
<_death> say (defun last-elt (list cont) (let ((*operations* (cons 'last-elt *operations*))) (funcall cont (alexandria:last-elt list)))) ... and the last continuation stores the operations list
<shka> jcowan: well, i simply made separate process, it just needs to terminate at some point
<shka> and that's it
<_death> (or you can compute the list and just call the operations as you go)
<shka> no shared memory at this point
<jcowan> That works
<shka> i hope that it does :D
<shka> but gonna see about that
<lisp123_> _death: Thanks, yes I was going to use continuations. Let me play around with that and try and wrap my head around it
<lisp123_> Continuations always take extra time for me :S
<lisp123_> jackdaniel: Sorry its a bit convoluted. Basically I have a set of inputs (A) and a set of processes. I want to get a potential output (B) by combining the various processes on the inputs (and their intermediary results), but I don't know if this is possible. However, once I do achieve success, I want to store the fact thats possible to go from A to B and these are the steps.
<lisp123_> _death: Thanks again for the code, I'm sure it will give me good ideas on how to doit
ec has quit [Ping timeout: 244 seconds]
Demosthe1ex is now known as Demosthenex
lisp-newbie has joined #commonlisp
<lisp-newbie> hi, i know we can mapcar a macro, so what can we do? (mapcar #'macro *list*)
<lisp-newbie> we *can't
ec has joined #commonlisp
<lisp-newbie> like it shouldn't be done
<Bike> (mapcar (lambda (x) (macro x)) *list*)? it depends on what you are actually trying to do.
<lisp-newbie> I'm trying to apply a macro to each of the elements of a list
<lisp-newbie> bik
<lisp-newbie> Bike
<Bike> okay but like what macro.
<lisp-newbie> Bike just one I made
<Bike> what i'm trying to get at is that what mapping means kind of varies depending on the particular syntax of the macro.
attila_lendvai has quit [Read error: Connection reset by peer]
<Bike> in the blog post here they use defparameter, which has one argument unevaluated, but some other macros evaluate all of their arguments
<_death> is it mapcar or mapc..
<beach> lisp-newbie: What made you decide to write a macro rather than a function?
<lisp-newbie> oh, I just want to do a macro to a list of things that I'm passing
<lisp-newbie> Bike
<Bike> i am asking what the particular macro is.
<Bike> because that changes the nature of the solution
<lisp-newbie> beach it's a macro that already exists, just thought it was better to have a one liner applying the macro to a list rather than 10 lines where only the thing I'm passing in to the macro changes...
<beach> Bike: I guess we'll never know.
<lisp-newbie> Bike oh it's a macro that calls a bunch of other macros
<Bike> okay but like
<Bike> you see how i mentiond defparameter and talked about how it evaluates things for example
<Bike> that's the kind of thing that would be good to know
<Bike> if you're keeping it secret you can just say that.
<lisp-newbie> Bike can send you the code.. one sec
attila_lendvai has joined #commonlisp
<beach> lisp-newbie: It looks like there is absolutely no reason to make this a macro.
<lisp-newbie> beach can it be a function and will it be evaluated during compile time? I tried and got some error...
<lisp-newbie> will change it
<beach> I think you have to make up your mind.
<beach> Either you want to have it do its thing at compile time, but then you don't mapcar it at run time.
<beach> Or else, you want it to work at run time, and then you don't make it a macro.
<beach> lisp-newbie: Don't tell me you are writing macros just for reasons of performance.
<Bike> this definition doesn't really tell me much since i don't know w hat any of these operators are, you know?
<lisp123_> beach: I'm not sure if this will add any value, but I have this note in On Lisp (page 110): In some cases, you can get what you want by enclosing the macro call within a lambda-expression. This works, for example, if you want to apply or funcall certain macros. However, this is an inconvenience. It doesn’t always work, either: even if, like avg, the macro has an &rest parameter, there is no way to pass it a varying number of arguments.
<Bike> could you just explain
<lisp-newbie> beach no, I was writing it as a macro because when I called the other macros I got a problem
<lisp-newbie> ok, one sec
<_death> it looks like a legitimate macro.. I'm guessing lisp-newbie wants to have a single form that expands to multiple def-model-functions forms
<beach> lisp-newbie: That is not enough of a reason. First you should figure out the nature of the problem and then determine how to solve it later.
<lisp-newbie> _death beach Bike I am defining functions with a function. I thought you needed to write a macro for that. Is that incorrect?
<lisp-newbie> A macro can define a function, but a function cannot create another function. Right?
<beach> It sure can.
<beach> (defun make-function (x) (lambda (y) (+ x y)))
<beach> (funcall (make-function 234) 333)
<lisp-newbie> beach and then that function is available outside for the system?
<beach> lisp-newbie: It has indefinite extent, if that is what you mean.
<lisp-newbie> outside of the function creating it? and I can access it in another package as well?
<beach> Packages are important only to the reader.
<beach> They don't have any role to play in the extent of functions.
Demosthe1ex has joined #commonlisp
<beach> lisp-newbie: Try something like this for instance:
<beach> (defun make-function (x) (lambda (y) (+ x y)))
<lisp-newbie> beach will do one sec
<beach> (defparameter *p* (loop for i from 0 to 10 collect (make-function i)))
<beach> Then something like (mapcar (lambda (fun) (funcall fun 234)) *p*)
<_death> the I binding there may or may not be distinct
<beach> Now *p* contains a list of functions, each one created by a call to make-function.
<beach> _death: Doesn't matter.
ec has quit [Ping timeout: 244 seconds]
Demosthenex has quit [Ping timeout: 252 seconds]
attila_lendvai has quit [Remote host closed the connection]
<beach> lisp-newbie: So those functions are now contained in a list that you can keep around forever if you like.
attila_lendvai has joined #commonlisp
<lisp-newbie> beach I want to create a function that I can call from another package, and if I do I'll get a symbol does not exist error with a function, I think...
<_death> you can also attach a function to a name (setf (fdefinition 'foo) some-function)
<lisp123_> lisp-newbie: call it like this package-name::function-name
<beach> lisp-newbie: The package does not have any impact on what functions you can call.
<lisp-newbie> _death yeah, got it
<beach> lisp-newbie: And I would appreciate it if you would acknowledge that you at least read my suggestion.
<lisp-newbie> beach yeah I read it
<shka> lisp-newbie: package is not what you think it is
<lisp-newbie> beach sorry for not replying quicker, I was thinking about what you guys are writing.
<beach> lisp-newbie: That wasn't obvious since you immediately ignored it and started talking about packages.
<lisp-newbie> beach I will try to refactor my code, let's see
<shka> package is not about software distribution, it is all about being containers of symbols
attila_lendvai has quit [Remote host closed the connection]
<beach> lisp-newbie: As you perhaps can tell, I am getting a bit annoyed with the way this conversation is going. You are attempting to use macros even though you don't know whether they are needed, and you don't know the basics of how functions work.
<lisp-newbie> beach oh that was an answer to what I read... according to that I would have to do paclage-name::*p* and then somehow find the function name that I want. right?
attila_lendvai has joined #commonlisp
tfeb has joined #commonlisp
<lisp123_> lisp-newbie: Sorry if its a bit harsh, but I think you may need to relearn more lisp before trying advance concepts. It will help in the long run
<beach> lisp-newbie: Why are you mixing up functions and their names. Some functions have names and some don't. And as _death pointed out, you can attach an anonymous function to a name.
<lisp-newbie> beach I hear, I used a macro based on something that cou;dn't be done, I don't remember exactly what it was... perhaps I did misunderstand something.. will think about refactoring everything with functions now
<beach> lisp-newbie: That's not true. You said something "didn't work" or something similar. That is different from "couldn't be done".
<lisp-newbie> beach ok, let's call it a day, thanks so much for the help, don't want to get anyone angry over here. will try your suggestions
<lisp-newbie> beach you are right
<beach> lisp-newbie: When I have something that "doesn't work", I don't turn my functions into macros. I figure out why it doesn't work.
<beach> lisp-newbie: So next time, explain what it is that you want done, and show the solution you tried, and why it did not work.
<beach> lisp-newbie: Then perhaps, you would be told something entirely differently from turning your functions into macros.
<lisp-newbie> beach ok, thanks
<beach> Sure.
<lisp-newbie> beach will use pastebin more often :)
<beach> Good.
<beach> And don't forget to include what you tried, what the result was, and what result you expected.
<tfeb> Can anyone tell me a format directive (my guess is some variant of ~G) which will always display the same number of significant figures and also deal with exponent notion elegantly?
<lisp-newbie> beach ok got it
ec has joined #commonlisp
<tfeb> 'elegantly' meaning 1.234, 123.4 but 1.234E3 say
<tfeb> I must be missing something here
<tfeb> what I don't want is exponents when they are not needed
<_death> think you need to diy
hendursa1 has quit [Quit: hendursa1]
<tfeb> _death: that's the conclusion I came to: that or always have exponents
hendursaga has joined #commonlisp
azimut has quit [Quit: ZNC - https://znc.in]
azimut has joined #commonlisp
attila_lendvai has quit [Ping timeout: 258 seconds]
lisp-newbie has quit [Quit: This computer has gone to sleep]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
tfeb has quit [Quit: died]
kagevf has quit [Ping timeout: 276 seconds]
kagevf has joined #commonlisp
lisp123 has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
lisp123_ has quit [Ping timeout: 252 seconds]
ec has quit [Ping timeout: 244 seconds]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
lisp-newbie has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<lisp123> How much "work" can be done in one second?
ec has joined #commonlisp
<lisp123> I am thinking of writing a scheduler type of program that switches between multiple processes every 1 second
<Bike> that is a question that depends quite a bit on context
<lisp123> Say I have 5 processes. Time starts at 0. Process 1 can run up to Time 1. Then control is passed to Process 2. .... And then repeat back to Process 1 at 5 seconds. So within each second, not only do the process have to do some amount of "work", but also check if "time is up" and pass control back (and then the scheduler has to pass control to the next process)
<lisp123> Measuring "work" is going to be hard, but say consing 50 times - could that be done within a second?
<mfiano> Doesn't seem very useful
<aeth> the check should be nearly instant
<Bike> almost certainly.
<Bike> you are describing cooperative multitasking.
<mfiano> Just use a regular event queue
<Bike> but you can probably just use the implementation/OS scheduler.
<lisp123> Bike: Yes, with a time based approach
<Bike> okay, but why?
<Bike> like what does that get you?
<aeth> is this a game loop thing? to try to get work done in 1/60 of a second?
<aeth> or something similarly real-time
<lisp123> It comes back to my earlier problem of going from A - > B. I don't know which path will get be there, so I want to give equal time to each path
<lisp123> aeth: no, its related to tree traversal (if I am using it correctly)
<lisp123> Basically green threads
<lisp123> Because each path will have its own set of branches, which again will have their own threads
<aeth> I'm not quite sure what you're doing, but modern computers are really, really fast. First, think up the proper algorithm (which should save you a lot) and then use an optimal data structure (which could possibly save you another 10x). And by the end of that, you probably don't even need threads because computers are really fast.
<lisp123> So hence I was wondering if 1 second is too short for any meaningful number of computations
<Bike> to give you a sense of scale, your computer executes several billion arithmetic operations every second.
<Bike> i mean you can just try it. (time (loop repeat 50 (cons nil nil)))
<Bike> 50 do*
<Bike> according to sbcl that takes me four microseconds.
<lisp123> I am looking at theorem solving, so unfortunately there is an exponential growth in the problem set.
<lisp123> E.g. 120! ends up at 6.689503e+198
<aeth> OK so now imo you're on step two in saving time: use an optimal data structure rather than conses.
<lisp123> Bike: That's great to hear, several billion is enough to do enough meaningful work
<lisp123> aeth: conses was just an example of an expensive computation, not that I will do that
<lisp123> But I get your point, I need to optimise carefully (but I want to get the basic algorithm down, and then tinker with optimisations)
<mfiano> 1.7e9 iterations of Bike's loop per second on my low-end machine
<aeth> First, algorithm because you can get big-O style speedups (but based on your description, that work could take years and a PhD to do)
<aeth> Then, data structure. Conses are rarely the most optimal and fastest way to do it. But this is going to be some smaller speedup like e.g. 10x
<aeth> Only after that, do something fancy.
Demosthe1ex is now known as Demosthenex
<lisp123> aeth: Thanks, so algorithm first then data structure - got it
<aeth> at least ime, other people will have other approaches
<lisp123> I got " 7 page faults" when running Bike's expression - is my computer dying :O
<aeth> Possibly. My old desktop had RAM failure
<mfiano> Only optimize if you need to. Lisp lets you just write unencumbered by performance concerns...until you need it after your idea is complete
<Bike> no. you don't need to worry about those.
<Bike> unless you get way more into optimization than you are, or probably need to for this problem.
<lisp123> A related question, (get-universal-time) increments by seconds - is there a way to get time at a smaller scale?
<mfiano> get-internal-real-time
<lisp123> mfiano: yes I agree. I just wanted to check if 1 second was enough time
<mfiano> along with internal-time-units-per-second
<Bike> one second is actually an extremely long time by coputer standards. it's like you're asking how many holes someone can dig in four thousand years. the answer is "a lot" and "maybe you should rethinking your digging program"
<Bike> rethink*
<mfiano> on recent SBCL, this is at microsecond scale (used to be millis)
<lisp123> Bike: Thanks, thats music to my ears. And if it doesn't work then I know I am going about it the wrong way
<lisp123> mfiano: Is that (get-internal-real-time)?
<mfiano> Yes
<mfiano> But the units it is in is implementation-dependent. Do some math with i-t-u-p-s
<lisp123> mfiano: Thanks. I-t-u-p-s didn't work for some reason
<mfiano> it does
<mfiano> or your implementation is not CL conforming
<beach> clhs i-t-u-p-s
<specbot> internal-time-units-per-second: http://www.lispworks.com/reference/HyperSpec/Body/v_intern.htm
<lisp123> The function INTERNAL-TIME-UNITS-PER-SECOND is undefined, and its name is reserved by ANSI CL so that even if it were defined later, the code doing so would not be portable.
<mfiano> Did you even read the page beach linked?
<lisp123> mfiano: I read all but the first words ):
<lisp123> constant
<mfiano> then you would have seen the second word :P
<lisp123> :P Clearly I underestimate computer performance by my own inability to do things fast :P
<aeth> it's one of the unfortunately named things, since +constants-should-look-like-this+
<lotuseater> i get 1_000_000
<mfiano> That convention came after standardization
<aeth> CL's old and it's compatible with older Lisps so sometimes the naming convention that must not be violated by you is violated by the standard in order to maintain compatibility
<aeth> which does make things confusing
retropikzel has joined #commonlisp
<lisp123> aeth: Thanks
Lycurgus has joined #commonlisp
yitzi has joined #commonlisp
lisp-newbie has quit [Quit: Leaving]
sander has quit [Quit: So long! :)]
ec has quit [Ping timeout: 244 seconds]
nij- has joined #commonlisp
sander has joined #commonlisp
attila_lendvai has joined #commonlisp
ec has joined #commonlisp
cosimone has quit [Remote host closed the connection]
selwyn has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
yitzi_ has joined #commonlisp
yitzi has quit [Ping timeout: 240 seconds]
Nilby has quit [Ping timeout: 240 seconds]
lisp123 has quit [Remote host closed the connection]
lisp123_ has joined #commonlisp
lisp123_ has quit [Read error: Connection reset by peer]
<akater[m]> I managed to post my question during some technical shenanigans. So I repeat it:
<akater[m]> Consider hypothetical alist accessor `alist-get`. `(setf (alist-get key place) new)` will not necessarily call `(setf place)`: when we push a new entry it will, but if we set an existing cdr, it might not. However, one might implement setf expander for `alist-get` so that `(setf place)` is always called. For example, I need this to invoke methods of the corresponding generic function `(setf place)`. Is there a special name for setf
<akater[m]> expansions that always do this? or for practice of defining such?
doyougnu has joined #commonlisp
lisp123 has joined #commonlisp
<shka> akater[m]: i don't know any in the standard
<shka> but in this case... simply always call (setf place)
ec has quit [Ping timeout: 244 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<Bike> akater[m]: so, what, it sets the alist to itself?
<akater[m]> Bike: Yes.
amb007 has quit [Ping timeout: 252 seconds]
<Bike> what if someone has a reference to an alist pair that isn't mediated through the alist?
<Bike> like (let ((pair (cons a b))) (push pair alist) (setf (cdr pair) c))
amb007 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
<akater[m]> Bike: Well, in this case there's a `push` form which according to the standard is equivalent to a corresponding `setf` form.
<Bike> i'm referring to the later set.
<Bike> i mean you could for example return pair from a function, and then ten minutes later change its cdr.
lisp123 has joined #commonlisp
<akater[m]> Bike: If someone is modifying an arbitrary accessor, there's of course no reasonable way to tell whether some setf accessor should be called. Here, it won't be called. But it is still valuable to have `(setf (alist-get key (my-accessor obj)) ..)` in the code.
ec has joined #commonlisp
<Bike> i don't understand the value. what distinguishes my situation here from assoc-value altering a pair?
<akater[m]> Bike: The value is, code being more readable.
lisp123 has quit [Ping timeout: 252 seconds]
<Bike> i don't understand. the setf alist-value looks the same either way. you're just talking about the definition of the (setf assoc-value) function.
lisp123 has joined #commonlisp
yitzi_ has quit [Quit: Leaving]
yitzi has joined #commonlisp
<akater[m]> Bike: I could write `(setf (my-accessor obj) (progn (setf (alist-get key (my-accessor obj)) new) (my-accessor obj)))` or I could define a setf expander for `alist-get` that ensures the `(setf getter)` call and write simply `(setf (alist-get key (my-accessor obj)) new)`. The latter is much better.
<Bike> but why do you want the (setf getter) call, and why do you not need the call if you alter the pair by itself?
<akater[m]> The call would still be needed but it's impossible to trigger this way. So pairs should not be altered this way. And I don't do it either in the code.
lisp123 has quit [Remote host closed the connection]
paulman has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
paulman has joined #commonlisp
<Bike> but why is the call needed?
tfeb has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
ec has quit [Ping timeout: 244 seconds]
kulernil has joined #commonlisp
paulman has quit [Ping timeout: 244 seconds]
<jcowan> Can someone explain to me what the benefit of slot inheritance in CL is, given that we have multimethods and not method inheritance? Subtyping I understand.
<Bike> what do you mean by a lack of method inheritance?
Lycurgus has quit [Quit: Exeunt]
<jcowan> As in Smalltalk/Java/C#/etc., where a method defined in a class is available to all its subclasses (often with some visibility control)
<tfeb> a method which applies to an instance of a class also applies (unless overriden) to any subclass. So if it relies on slots ...
<tfeb> (to am instance of any subclass)
<Bike> jcowan: does call-next-method not count?
attila_lendvai has quit [Ping timeout: 258 seconds]
<jcowan> I'm not sure why that matters.
<jcowan> IOW, if all slots were treated as private to the class (by convention in CL), what would be harmed?
<tfeb> nothing (except expressiveness) but they would still be inherited, of course
<Bike> it's sometimes useful to declare a tighter type for a slot and stuff.
<akater[m]> Bike: The call is needed because certain methods should be called each time when certain data is updated.
<Bike> but the alist place isn't actually updated.
lotuseater has quit [Remote host closed the connection]
<jcowan> Bike: For example?
ec has joined #commonlisp
<Bike> in cleavir there are a bunch of classes for IR. there is a general instruction class with a sequence of inputs. there is a no-input mixin that additionally declares the inputs to be an empty sequence and gives them an empty sequence initform.
<Bike> so if you have an instruction that doesn't take inputs you can just give it the no-input mixin.
<akater[m]> Bike: When `(setf (alist-get ..) ..)` is called, alist is updated (it might end up being the same of course but that's irrelevant).
<Bike> that said, this is all done within the system, so at best it's like c++ "protected" rather than "public".
<tfeb> jcowan: the point is that it's not the language's business to make that decision. If you want to treat slots as private to the class they are defined in, you can. If you want to override parts of their definition, you can. CL treats programmers like adults.
<Bike> akater[m]: i mean for example if you have observer methods, they can't get a before/after value the way they might expect. i don't understand what these methods want to do.
utis has joined #commonlisp
<jcowan> tfeb: That's a matter of degree. As someone who used to write whole applications in assembly language, *that* language treats you like an adult: it hands you a double-edged straight razor without a handle.
<tfeb> jcowan: sure, but having the language insist that slots are all private to their class is very definitely treating its programmers as children
<utis> if there a way to make (read-line) finish on EOF, even if some input was already given? i was trying to write a simple cat, but it behaves differently from the standard when one types something and then presses ctl-d on a non-empty line
<utis> s/f/s/
<tfeb> jcowan: rather than allowing them to do that if they wish (which is easy)
<Bike> utis: use LISTEN, maybe?
<jcowan> Do you consider that CL treats you like a child because go tags don't have indefinite scope and extent?
<tfeb> I give up.
<jcowan> I'm not mocking you. I'm quite serious about this.
<akater[m]> Bike: I don't see why it matters what those methods try to do. My `:after` method recomputes something according to new data in the changed alist. `:before` method checks the type (maybe).
<pjb> akater[m]: typically, to define such a place, you would define a setf-expander: https://termbin.com/rttn
amk has quit [Ping timeout: 245 seconds]
<jcowan> You obviously draw the line somewhere, and I'd like to know where.
retropikzel has quit [Quit: Leaving]
<akater[m]> pjb: I already defined everything. I'm just asking whether there is a term for it that I could use in the explanation and also because it seems the practice should be of general interest.
<tfeb> Grow more bits in your mind: there is a continuum between being allowed to do what you want and being told by the language what you can do. But never mind
<pjb> akater[m]: now the thing is as you an see we test ,acs, and set the cdr of ,acs if the entry is found or just use acons to create a new entry in the front of the list, and the writer-form is used. But in both cases, it returns the ,vvalue form, ie the name of the variable holding the value that has been set (so that setf can return it).
tfeb has quit [Quit: died]
<pjb> akater[m]: now if you want to ensure that the writer-form is called in both cases, you can do that, it will not do any harm.
<Bike> huh.
<pjb> akater[m]: like this for example: https://termbin.com/lhz6
<Bike> i think your question was reasonable, for what it's worth, jcowan
<jcowan> Thanks.
lisp123 has joined #commonlisp
<Bike> though i think the dynamic extent of exit points is less about an idea of what programs are allowable and more about efficiency
<pjb> akater[m]: well, before defining a term, we should observe that in practice the reader-form and the writter-form will not be a call to a pair of functions such as foo and (setf foo).
<pjb> akater[m]: for example, try a few (get-setf-expansion '(aref foo i)) (get-setf-expansion '(gethash k too)) etc.
<Bike> i guess you could also make an argument like kmp's unwind-protect thing, but i don't know if that was relevant during the standardization process
<pjb> akater[m]: you may get pairs such as (ccl::aset #:g16852 #:g16853 #:g16851) (aref #:g16852 #:g16853) and (ccl::puthash #:g16855 #:g16856 #:g16854) (gethash #:g16855 #:g16856).
Guest74 has joined #commonlisp
<utis> Bike: thanks
<Guest74> Hi, I've got a question about special variables which I've heard have some performance issues sometimes
<akater[m]> Guest74: It's productive to think about performance issues when you actually encounter them.
<Guest74> If all I use a special for is to be bound in a let and used as optional parameters in a function will that be the same as just providing whatever is bound to the function
<pjb> akater[m]: but in general, the thing is that a mutator of a place doesn't need to always mutate the place. It can instead mutate the object referenced from the place.
<shka> Bike: i want to point out that (setf ldb) is a thing
<Bike> akater[m]: sorry for all the questions. i don't think there is a particular name for what you want. the accessors in the standard don't do it (e.g. cddr)
<Bike> shka: yes?
<shka> so perhaps setf on assoc list is not so weird
<pjb> Guest74: special variables are in general global variables (and even temporary special variables should be considered global), and it is bad to use a lot of global variables all over the code. So if you apply good software enginering techniques and use only a few global variables from a few places, then there should be no performance problem.
<pjb> Guest74: just avoid to access or set them from inside a deep loop.
<Bike> i don't think setf on assoc list is weird. i called it "assoc-value" because that's what it's called in alexandria. I think it is a useful operator. I am just not so sure of the use of mandating intermediate writers be run.
<Guest74> it's just to avoid having to pass graphics contexts, inks, etc... in graphic drawing functions.
<pjb> akater[m]: you can define (setf (* foo 2) 6) (assert (= foo 3))
<Bike> Guest74: you mean you have like (let ((*x* 7)) (f *x*))?
<shka> Bike: ok, i misunderstood you
<Bike> or (defun f (&optional (x *x*)) ...) (let ((*x* 7)) (f))?
lotuseater has joined #commonlisp
<Guest74> (let ((something:*special* graphic-context))(draw:bezier pt1 pt2 pt3 surface &optional (gc something:*special*))
<Guest74> maybe even having the surface as a special
<Bike> that seems like my later example, in which case yes. (defun f (&optional (x *x*)) x) (let ((*x* 7)) (f)) => 7
<pjb> Guest74: there are two things to consider here: if you call directly the graphic drawing functions that use the parameter, then it may be more efficient to pass a lexical parameter rather than use a global dynamic variable. But often, you will call custom drawing functions, or other application functions that will call indirectly the graphic drawing functions. And in that case, it would be more inconvenient and less efficient to pass
<pjb> around all the parameters needed by the inner graphic drawing functions.
<akater[m]> Bike: Yes I see that standard ones don't do this. But the fact that setfs not only come form define-setf-expander's but may also be generic functions, makes me wonder if it would be better if they would. Or whether the topic was explored and discussed among Lispers.
<pjb> Guest74: hence the use of global special variables for such functions.
<Bike> i don't remember it coming up. i think we in general are less inclined to use observers and stuff. i wrote a system for it once, but the initial impetus was copying some python behavior.
<pjb> akater[m]: do you need to reset a slot when some object in a galaxy far far away has been mutated, just because you can reach it from that slot?
<Guest74> you would have to bind the special before calling the functions, it'd just be (defvar something:*special*) at the top, i.e., not bound
<pjb> akater[m]: what if that object in a galaxy far far away had been referenced thru another path?
<pjb> Guest74: yes.
lisp123 has quit [Ping timeout: 252 seconds]
<Bike> yeah, you can do that, though i will say it can lead to annoying mistakes.
<pjb> (let ((something:*special* graphic-context)) (some-function-that-will-call-some-function-that-will-call-draw\:bezier))
<pjb> Guest74: ^
<pjb> Guest74: and note that it could be more efficient to have: (draw:bezier pt1 pt2 pt3 surface) calling (draw:bezier/gc pt1 pt2 pt3 something:*special*) so no &optional, and you can use draw:bezier/gc directly if you have a gc in a lexical variable.
<Guest74> yes, that should be fine right? for example, the generics for rectangle will call line which will call point and all should use the same context.
<akater[m]> pjb: It's not really far away. It is actually always lexical, if I'm not missing anything.
<pjb> Guest74: for internal functions, it's better of they don't use &optional &key and even &rest.
<pjb> only mandatory parameters.
<Guest74> I've been wondering if this isn't an issue with sbcl's block compiling.
<pjb> akater[m]: well, a-list can be long. What if you are mutating the 1000000th cons cell?
<Bike> Guest74: wait, what?
<Bike> what does block compilation have to do with special variables?
<pjb> akater[m]: also a-list are typically shared. What if 3 other objects can find the same cons cell in different lists sharing a tail, so the same cell is teh 80000th in one and the 20000000th in another?
<pjb> akater[m]: What I mean here, is that the thing that is mutated may have no direct relationship with the place from which it is accessed.
<pjb> Guest74: blocks are lexical. This is unrelated to dynamic variables.
<Guest74> more what it has to do with &optional &key etc... if it can get rid of performance issues when it sees everything is lexical.
Wairu_Goodman has joined #commonlisp
<Bike> well it's not lexical. and i don't know if sbcl ever reduces dynamic variables to lexical ones.
<akater[m]> pjb But if you use a generic accessor you should be ready for arbitrary side effects anyway.
<Guest74> would block compiling reduce the impact of calling generic functions within generic functions? as the aforementioned rectangle calling line calling point?
<moon-child> (let ((*x* y)) ...) can be reduced to (let ((old-x *x*)) (progn (setf *x* y) ...) (setf *x* old-x)). Which is not terrible
<pjb> akater[m]: indeed. You can add those side effects when setting the place with a generic accessor. But note that you should also have some restreint, and apply the Lyskoff Substitution Principle, so if you have side effects, they should be innocuous.
<moon-child> err, add unwind-protect
<Bike> Guest74: i don't think sbcl block compilation affects generic dispatch at all either.
<pjb> Guest74: possibly but difficultly. In lisp things are very dynamic: the set of classes and of methods can change at run-time. Even the class of an object can change while evaluating a function (thanks to multi-threading).
<Bike> you should just write your code in whichever way is clear, and then later if it's slow examine what in particular could change to speed it up.
minion has quit [*.net *.split]
mfiano has quit [*.net *.split]
andreyorst has quit [*.net *.split]
jgkamat has quit [*.net *.split]
froggey-1 has quit [*.net *.split]
easye has quit [*.net *.split]
Kabouik has quit [*.net *.split]
spacebat1 has quit [*.net *.split]
dcx has quit [*.net *.split]
gko has quit [*.net *.split]
jackdaniel has quit [*.net *.split]
zups has quit [*.net *.split]
specbot has quit [Read error: Connection reset by peer]
<pjb> Guest74: so (defmethod foo ((a class-1)) (bar a)) -> it may be (defmethod bar ((b class-2))) that is called instead of (defmethod bar ((a class-1)))!
jackdaniel has joined #commonlisp
mfiano has joined #commonlisp
gko has joined #commonlisp
<Guest74> it's already slow :)
froggey-1 has joined #commonlisp
zups has joined #commonlisp
Kabouik has joined #commonlisp
<pjb> Guest74: if (defmethod foo ((a class-1)) #| Here, another thread works and (change-class a 'class-2)) |# (bar a))
<Bike> okay. hve you profiled and seen what about it is slow?
minion has joined #commonlisp
Kabouik has joined #commonlisp
Kabouik has quit [Changing host]
specbot has joined #commonlisp
jgkamat has joined #commonlisp
spacebat1 has joined #commonlisp
<Bike> because dynamic variables and generic dispatch are usually pretty quick.
andreyorst has joined #commonlisp
<pjb> Guest74: so the compiler would have a lot of global analysis and a really hard time that such at thing cannot occur, and that it can compute the methods called from foo at compilation time.
Cymew has quit [Ping timeout: 240 seconds]
<Guest74> the generic interface is a lot of the problem. I have a generic protocol.
Lycurgus has joined #commonlisp
<Guest74> the generic protocol mainly just calls backend specific functions. If you compile a file with the backend specific stuff it's much faster.
jackdaniel has quit [Changing host]
jackdaniel has joined #commonlisp
dcx has joined #commonlisp
lotuseater has quit [Quit: lotuseater]
<pjb> Guest74: that's a good point indeed. CLOS gives a lot of hooks. It may be more efficient to design the code more "statically" and with more precise and explicit hooks when needed (eg. take a call-back argument).
<pjb> And of course, you can always wrap such an implementation in some CLOS facade.
<Bike> if the generic functions just call the backend functions, rather than each other, shouldn't any call only involve one generic dispatch?
<Guest74> As a bare minimum a backend can be implemented by just defining one method for drawing a pixel. Then there is a simple implementation for every other draw function that calls other generic functions which ultimately call the pixel function.
<pjb> Well, it makes the software extensible, but in block. When you define a new class (or even a subclass), you have to re-implement everything.
<Guest74> I thought it might be a quick way to make backends somewhat usable.
<Guest74> i may be wrong.
<pjb> Guest74: that's another point. What you may think as a core and fast function such as draw:bezier, may actually only be the start, a new toplevel function for things way more complex than you imagine. For example, it may perform some symbolic optimization, involve a network protocol with a remote X server or it may have to compile some cuda code to download it to a GPU. What you thought would be a simple bit flipping operation, may
<pjb> actually call up megabytes of library code…
<pjb> Therefore your optimization is entirely useless.
<Guest74> admittedly the generic overhead is nothing compared to when I draw on remote servers.
<Guest74> though standard x and render are basically the only full fledged backends I have so no generics calling generics there.
<Guest74> oh well, I'll try the specials and see if anybody complains about the api when I release it. I'd just really like the vector drawing and raster drawing to have similar calling conventions.
<akater[m]> So far I don't actually see any downsides to demanding getters to be setf'd in expansions. It is more convenient (see the example) and to me it also looks more natural, as long as generic setf's exist at all. If you want to avoid triggering a setf accessor, you can always bind the value to a local variable. I don't see it being conceptually different from paying attention to setfable expressions the way we do now.
MichaelRaskin has joined #commonlisp
gaqwas has joined #commonlisp
lisp123 has joined #commonlisp
<Bike> i think the problem is less with doing it and more being able to enforce that updates only take place in these limited defined ways
<Bike> some conceptual issues would have to do with threading and with circular structures
<Bike> e.g. if you have #1=(1 2 . #1#) and rplaca it, do you update both conses?
specbot has quit [Remote host closed the connection]
minion has quit [Read error: Connection reset by peer]
specbot has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
minion has joined #commonlisp
nij- has quit [Ping timeout: 258 seconds]
<akater[m]> Bike: rplaca is not a setf form. And (setf car) is not a generic function.
<akater[m]> But I do wonder how much of existing code would actually break if all setf expanders suddenly behaved this way.
<Bike> you can replace the conses with standard objects
<Bike> they can still be circular
<akater[m]> Bike: Then you don't update any more conses than written, you update a cons and an object slot.
amb007 has quit [Ping timeout: 258 seconds]
<Bike> i'm talking about having an object that is like a cons, not a cons. but my basic issue is that in programs it is not always obvious when objects "belong to" other objects in a conceptual sense. I already gave the example of an alist pair floating around separately from the alist. It is possible to write programs so that that is never done, but that cannot be enforced by the language and is a pretty
<Bike> severe restriction.
<Bike> if you want to update "owners" it makes more sense to maintain specific backpointers in the objects
amb007 has joined #commonlisp
makomo has quit [Ping timeout: 240 seconds]
<akater[m]> I wouldn't even consider having backpointers everywhere. It's more expensive than necessary and it's too easy to miss something anyway. OTOH, telling users “according to our protocol, thou shall only update objects with this '(setf ..)`” is normal.
gxt_ has quit [Remote host closed the connection]
lisp123 has quit [Ping timeout: 252 seconds]
gxt_ has joined #commonlisp
mister_m has joined #commonlisp
lotuseater has joined #commonlisp
Wairu_Goodman has quit [Ping timeout: 240 seconds]
<Bike> but you're not just asking for that - you're ruling out maintaining references to inner objects, because if you have such references, you can modify the objects without modifying their "owners".
<Bike> as in the alist example, where the ability to get at any pair in the alist screws up the updating. and of course similar things are possible with standard objects rather than conses.
Lord_of_Life_ has joined #commonlisp
peterhil has quit [Ping timeout: 252 seconds]
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<akater[m]> Bike: Yes. Inner objects are created entirely within the library; altering something not created by you is generally a bad idea, right?
<Bike> I mean, no? depends on the library.
<Bike> if i define a class with accessors, the standard library creates generic function objects. i am allowed to alter those (by adding/removing methods etc) without worrying about the class definition that originally created them, because backpointers are set up to keep everything consistent.
amb007 has quit [Read error: Connection reset by peer]
cage has quit [Remote host closed the connection]
amb007 has joined #commonlisp
<akater[m]> Classes are different. I'm talking about destroing a list not consed by me. I would never do it.
<Bike> it's not different. the library is creating a mutable object, the generic function, which is referenced by the class, another mutable object.
<Bike> the library consed the generic function.
waleee has quit [Quit: WeeChat 3.2]
rain3 has quit [Ping timeout: 245 seconds]
<dieggsy> can i have (format nil "~a" thing) ignore *print-right-margin* ?
<lotuseater> you could wrap it in a let form with (let ((*print-right-margin* t)) ...)
<lotuseater> as the default value seems to be NIL
<lotuseater> okay forget it :D
Guest74 has quit [Quit: Connection closed]
<lotuseater> it shall be of type (or unsigned-byte null)
<dieggsy> ?
<dieggsy> ah
lisp123 has joined #commonlisp
waleee has joined #commonlisp
makomo has joined #commonlisp
<pjb> dieggsy: bind *print-pretty* to nil.
<dieggsy> pjb: thanks!
lisp123 has quit [Remote host closed the connection]
lsip123_` has joined #commonlisp
lisp123 has joined #commonlisp
lsip123_win10 has quit [Ping timeout: 248 seconds]
lisp123_ has joined #commonlisp
lisp123 has quit [Ping timeout: 268 seconds]
attila_lendvai has joined #commonlisp
silasfox has joined #commonlisp
rgherdt has joined #commonlisp
lisp123_ has quit [Read error: Connection reset by peer]
lisp123 has joined #commonlisp
yitzi has quit [Quit: Leaving]
silasfox has quit [Ping timeout: 248 seconds]
attila_lendvai has quit [Ping timeout: 258 seconds]
Lycurgus has quit [Quit: Exeunt]
lisp123 has quit [Remote host closed the connection]
ec has quit [Ping timeout: 244 seconds]
pve has quit [Quit: leaving]
nij- has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
lisp123 has joined #commonlisp
akoana has joined #commonlisp
lisp123 has quit [Ping timeout: 250 seconds]
gaqwas has quit [Ping timeout: 248 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 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]
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
cosimone has joined #commonlisp
amb007 has quit [Ping timeout: 250 seconds]
amb007 has joined #commonlisp
<nij-> Hmm.. both (quote (function +)) and (list 'function '+) give #'+ but not the list (function +), where the car is the symbol 'function... what can I do to get the list (function +)?
<hayley> Try (first '#'+)
<nij-> Oh! So #'+ is just a printer sugar for the list (function +).
<nij-> Thanks, hayley
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
cosimone has joined #commonlisp
<pjb> #' is a dispatching reader macro.
<pjb> nij-: some implementation may print '(function foo) as #'foo ; but the sugar is in the reader.
<nij-> No.. it's definitely in the printer.. consider (list 'function '+)
<nij-> evaluating this, it prints gives something that is printed as #'+
<nij-> If I read that back, then the dispatching reader macro is working.
<moon-child> nij-: a conforming implementation _could_ print the list as (function foo)
<moon-child> afaik
<pjb> nij-: it depends on the implementation! https://termbin.com/wv3r
<pjb>
<pjb> it's not in the printer, it's in the implementation!
<moon-child> but the reader syntax is required
<pjb> both (function foo) and #'foo are readable, so both can be used to print readably.
makomo has quit [Ping timeout: 268 seconds]
<Bike> yeah, printing #'foo as (function foo) is allowed. i don't know if any implementations are that dumb though.
<pjb> Bike: abcl as I demonstrated!
<pjb> but it'snot dumb, it's the right thing to do.
<pjb> you're not always printing code!
robin has quit [Ping timeout: 240 seconds]
<nij-> I see
<mfiano> pjb: Curious why you don't use #' in your codes
<mfiano> I see lots of (function foo)
<dieggsy> If i call (package-name package) from a function, will it always return the package that the function was defined in, or will it spit out whatever current package i'm in ?
<dieggsy> ....hoping for the latter i guess
<mfiano> No
<dieggsy> er (package-name *package*)
<mfiano> It won't always
<mfiano> *package* is a special variable. It has dynamic scope.
<dieggsy> mfiano: does that mean option 2 is true ?
<dieggsy> ok, good.
<akater[m]> dieggsy: functions are not “from packages”, only their names are.
<dieggsy> Ah, fair point
<nij-> I've been trying to formulate this questions for 2 hours, but I don't think I have done it perfectly. Anyway, here it is: https://bpa.st/VMRQ
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<mfiano> That is not very hygeinic of you
<dieggsy> nij-: what's the question
<nij-> Notice how I really want to include "package-name *package*" in the macro. This is because (defun a::foo ..) and (defun b::foo ..) do give different results, and I want the macro to include the "current" package when it is evaluated.
<nij-> mfiano: my macro?
<nij-> I think so..
<hayley> Why are you writing a::foo to start with?
<nij-> I have different math structures, and I have defined operation <+> for them.
<mfiano> You likely want (package-name op)
<mfiano> Also that can be simplified some with alexandria:format-symbol
<nij-> lemme try
<mfiano> No need for read-from-string
<mfiano> also, you probably want to rename "multiary" to variadic
amb007 has quit [Read error: Connection reset by peer]
cosimone has quit [Ping timeout: 258 seconds]
amb007 has joined #commonlisp
<mfiano> You don't need format-symbol there anyway
<mfiano> The package of the symbol you generate will be that of the calling package
<mfiano> You could just use alexandria:symbolicate
<nij-> I want (package-name *package*) indeed.
<mfiano> (alexandria:symbolicate ,op '#:-binary) for example
<mfiano> No you don't
<nij-> I want the package to be the one that's current when it's evaluated.
<mfiano> That wont be the case
rgherdt has quit [Ping timeout: 240 seconds]
<mfiano> You are evaluating that at macro-expansion time, in the package the macro is defined in
<mfiano> Rather than the package of thye calling code
<nij-> Oh indeed..
<mfiano> Try expanding your macro in different packages. The let binding will be bound to a symbol in the caller's package, while the name of the function will be in the macro's package
<nij-> what can I do in order to achieve what I wnat?
<mfiano> Ok let's start over
<mfiano> I assume you want to generate a function with a symbol in the package that you call the macro in
<mfiano> as its name
<nij-> Yes
<mfiano> `(defun ,op (&rest xs) ...)
<mfiano> Now for the inner format...
<mfiano> Reading code, sec
<nij-> cool
<mfiano> The 2 branch seems suspect
pillton has joined #commonlisp
<mfiano> That is calling the function bound to op2, but it is a symbol, and i see no function with a -binary suffix
<nij-> It's going to apply to other functions.
<akater[m]> nij-: Looks like you just want `intern`.
<nij-> For example, in another package I'd have a method <+>-binary defined.
<mfiano> Why? It seems that you are doing out of band generation
<nij-> And then I can call (def-multiary-operator <+>) to define the rest.
<mfiano> If this macro expects to call a function *-binary, then this macro should probably generate it
<mfiano> s/this macro/the code this macro generates/
<nij-> Lemme see how I should put this..
<nij-> so I have structures "set" and "vector-space"
<mfiano> It seems an unecessary burden on the user of this macro to define another macro. That's a footgun
<nij-> I have two packages 'set and 'vector-space
<nij-> in the package 'set, i have a class 'set
<nij-> and I define set:<+>-binary for two sets
<nij-> same for vector-space
shka has quit [Ping timeout: 240 seconds]
<pjb> What same?
<nij-> so now I have two functions #'set:<+>-binary and #'vector-space:<+>-binary
<akater[m]> nij-: Before you define your own foundations for a gargantuan effort of writing a computer algebra system, maybe read about existing efforts. Maxima looks like it has no design at all but Weyl has, and it has a clean manual by SimLab group, available in PDF.
<mfiano> Yeah you lost me
<pjb> Why are they different?
<pjb> nij-: why don't you define a single generic function?
<pjb> nij-arithmetic:<+>-binary
<pjb> Then you can add methods for sets and methods for vector-spaces.
<nij-> pjb! oh yes
<nij-> should have done that
<nij-> Sorry folks.. I shot my feet many times, only to try to explain how i did it.
<mfiano> nij-: But the much simpler code I gave you solves the problem with the function name
<pjb> ok. Now I can go to bed. Good night!
<nij-> I think pjb's advice will work. That's the cleanest
<nij-> thanks pjb
<nij-> gn ;; mfiano which simpler code?
<mfiano> nij-: You want to generate code for the function name. By using ",", you are evaluating that at macro-expansion time, and not generating code using the calling package
<mfiano> nij-: `(defun ,op (&rest xs) ...)
<mfiano> That is all you need for the function signature
<mfiano> So you just have to work out the function body
<nij-> I used to define in this way but there was a bug too.. lemme think if that's explanable.
<mfiano> I would recommend On Lisp or Let Over Lambda as good macro books
<mfiano> It seems you have some misunderstanding of the phases of evaluation in a Lisp compiler
<nij-> Yeah, pretty much.
<nij-> And I got quite confused by that.
<mfiano> First, a file is READ
<mfiano> To put simply and not entirely technically correct, this means the string contents of the file are parsed, and any reader macros are expanded into s-expressions as well
<mfiano> Then, macros are evaluated, in which case, you generate s-expression, like your outer backtick before DEFUN, and any unquotes at this level (the ",") is evaluated at exactly this time
<mfiano> So the result will be your generated code with some of it resolved at macro-expansion time (the ",") parts
<mfiano> Then your code is compiled.
<mfiano> READ, MACRO-EXPAND, COMPILE
<mfiano> in that order, file by file
<mfiano> Hope that helps. I'm a bit tired so probably explained very poorly
<mfiano> So, when some file that calls your macro is sent to the compiler, first the string is converted to s-expressions while at the same time any reader macros are also expanded into s-epxressions. Then your macro is "expanded" into different s-expressions. Then THAT is compiled
<mfiano> So if you want to generate a function whose name is the symbol of OP that was supplied to the macro...well that symbol is already in the correct package, assuming it wasn't qualified with a different package. (in-package :mypkg) (my-macro foobar) => (defun mypkg::foobar () ..)
<mfiano> I annotated the actual package of the defun's name, which wouldn't be shown if you expanded it in this package, just to show you that OP is already a symbol in the correct package!
<mfiano> Now I'll wait for the inevitable pedants to try school my tired mind
<mfiano> or for more questions (back to code until pinged)
random-nick has quit [Ping timeout: 252 seconds]
akoana has left #commonlisp [Leaving]
<pillton> Any recommendations for a key-value database? I need something file based with either transactions or fast open/close. The keys and values are strings.
Krystof has quit [Ping timeout: 240 seconds]