libera/#commonlisp - IRC Chatlog
Search
16:58:25
jeosol
I am discussing with some folks next week who may ask: what is the CL macros I talk about. I saw this link: https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node97.html#:~:text=The%20Common%20Lisp%20macro%20facility,as%20in%20most%20other%20languages. which I think is good. I don't think they'll understand but I can try to explain in layman terms
16:59:15
jeosol
basically, I use macros to generate a lot of functions that have symmetry in the function body.
17:00:04
NotThatRPG
It's a deep matter, because CL has the notion of the running image, which macro expansion can access. None of the conventional compiled languages have anything comparable. I'm not sure whether that features in your code.
17:06:12
jeosol
The key two aspects of CL I highlighted were CLOS and Macros. The person may or may not know or heard about CL but I will ask them first.
17:06:41
_death
jeosol: http://web.archive.org/web/20120124144817/http://weitz.de/macros.lisp may be of interest
17:07:05
jeosol
I came across a guy who told me you use Lisp in the early 80's and surprised at use it. He is the deep learning space. I told me one of the compilers has monthly release cycles to this day and he was really surprised
17:13:59
_death
another one is a simple short-circuiting product operator.. like (* (foo) (bar)) .. if FOO returns 0, why should you evaluate BAR (assuming no side effects) ?
18:37:43
NotThatRPG
jeosol: yes, that was... It's relevant to how CL macros differ from macros in other programming languages
18:38:44
NotThatRPG
jeosol: Just waiting for the CL bindings to numpy and pandas to be released! ;-)
19:11:19
Guest491241242
Hi, currently my ql:quickload command loads a library from ultralisp distribution. I would like to download the library from quicklisps projects. How could I specify this?
19:20:43
NotThatRPG
I don't see a way that you can control on a per-system basis which distribution a library comes from. Since quicklisp can make recursive computations, I think you are stuck with a single ordering over all your distributions (i.e., you either always get from ultralisp first or always from ql first).
19:21:23
Guest491241242
I think I managed to do it by disabling the ultralisp using expression (ql-dist:disable (cadr (ql-dist:all-dists)))
19:23:48
NotThatRPG
Guest491241242: Unless you know in exquisite detail all the dependencies of the systems you need, it's not obvious how to control quickloading with > 1 distribution. ISTR there's someone (shinmera?) who has a library that lets you assemble your own distribution.
19:31:32
Guest491241242
NotThatRPG: thanks, currently I don't have a need to use separate distributions or create my own. At some point I had tried something with ultralisp but had not remembered to change it back quicklisp's distribution.
19:53:14
NotThatRPG_away
stylewarning: ? You mean you want to add a new component type that's a conda package? a conda environment?
20:16:34
NotThatRPG_away
Shinmera: I just noticed -- your documentation is a mess! or ... a ".mess" ;-)
20:18:19
NotThatRPG
It occurs to me that it would be nice if we could create a new dist that is just pointers into other dists, without having to actually replicate, but I don't know how hard that would be. HTTP redirection?
20:20:06
Shinmera
or rather, each dist release includes an url for each project's release that it includes.
20:23:33
Shinmera
I also would like to support it using another dist as a project's source (with replication)
20:29:47
stylewarning
NotThatRPG: I'm not 100% sure. I'm thinking of something like :depends-on which ensures foreign dependencies are loaded (?) or installed (?)
20:34:19
Shinmera
stylewarning: I have thought about that problem before but I honestly think it's not a great idea because of the massive diversity of system configuration tools out there that would need to be handled, not to mention the massive variance in *versions* those tools provide.
20:34:41
Shinmera
Instead, if I write a bindings library, I instead ship a version for every platform with the sources.
20:35:29
Shinmera
Once Forge is in a more state of actual existance I want to switch to building the foreign libraries, though.
20:35:30
NotThatRPG
stylewarning: If you want to do that you need to tell ASDF what a conda dependency is. Thinking not very hard about this, I would suggest: (1) you would need to give ASDF some way to find (or create) a conda env that contains the python systems you want. Maybe make a mixin for class (to add to ASDF system classes) to allow an ASDF lisp system to be associated with a conda env. (2) add a SECOND subclass of ASDF system that
20:35:30
NotThatRPG
corresponds to a python package, call it PYTHON-SYSTEM. Then you would have to add (at least) a PERFORM LOAD-OP method for PYTHON-SYSTEM that would know how to load a python system into the conda environment.
20:36:53
NotThatRPG
It's not great that python has so many different loading methods. If your user doesn't have conda installed, and just uses pyenv, for example, they would be SoL.
1:19:48
atgreen
_death, hayley .. reverting SBCL from 2.2.7 to 2.2.6 solved my corruption error from earlier today
1:27:04
hayley
I'm too busy today to look through the cl-postgres code, but it is still possible that it is modifying literals in a way that isn't allowed in Common Lisp, and it's caught by SBCL 2.2.7 now.
1:29:04
hayley
...after a quick glance that doesn't seem likely, but there is a (optimise (safety 0)) declaration that you could remove.
1:46:36
hayley
(setf (aref "blab" 2) #\u) is undefined behaviour. After SAVE-LISP-AND-DIE, SBCL 2.2.7 would put that string in read-only memory, so trying to write to the string would cause a memory fault.
1:47:02
hayley
But I don't think that's the issue; the use of (safety 0) in that function causing a memory fault is more concerning to me now.
3:17:56
aeth
easy bonus points to score: submit PRs to remove all (safety 0) except when the (safety 0) actually has a purpose (basically, to remove bounds checks) and even then you can probably move it to a tightly bound LOCALLY (instead of the typical function scope) to limit the chance of bugs surfacing there