freenode/#lisp - IRC Chatlog
Search
20:44:04
moldybits
if obj is an instance of a class defined in package P, and i want to get or set the slot value, i have to (slot-value obj 'P::slotname). hm ...
20:46:41
scymtym
moldybits: you would normally use an accessor (whose name would normally be exported from P)
20:48:47
scymtym
i.e. for (defpackage #:p (:use #:cl) (:export #:name)) (in-package #:p) (defclass c () ((name :accessor name))) you would have something like (in-package #:p2) (p:name obj) (setf (p:name obj) value)
20:49:31
moldybits
i'm using my own setter so that i can store the modifications done to the object in a history list. i could :before all the setting accessors, or maybe there's even a way to do it for all of them, but that'd hide the magic. hm.
20:50:29
moldybits
one option would be to take whatever symbol is passed in an get the corresponding one in P.
20:54:58
moldybits
i don't know what those are. i'm reading keene's book, though. hopefully she'll cover it. :p
20:56:19
phoe
moldybits: you'll want to get into metaprogramming. see, in Lisp, classes are just objects like all other objects, and you can modify them like all other objects.
21:02:55
phoe
moldybits: that'll allow you to do things like https://plaster.tymoon.eu/view/1267#1267
21:19:59
Bike
LdBeth: what you actually do is define your own class of slot-definition, which lets you do that, yes
21:33:35
shka_
line 48 and 55 contains code required for mop machinery to locate proper slot definition based on the metaclass
21:36:43
vms14
you mean it's not explaining things very well so you need to make a bit of research or alike?
21:38:35
shka_
understanding what the hell is PG trying to explain with CPS macros was challenging for no good reason
21:40:07
shka_
anyway, that's just my opinion, you may have directly opposite opinion and that's fine
23:14:04
didi
Suppose I have a function that returns a variable number of values, so I will use VALUES-LIST to return accumulated values. I want to alleviate the creation of this intermediary list. How about using a construction like (defun fn () (let ((l (produce-result-list))) (declare (dynamic-extent l)) (values-list l)))?
23:25:25
Bike
since the code that produces the list is within that function, and wouyld need to know to allocate on the stack
23:26:16
didi
Bike: Interesting. So what about, instead of (produce-result-list) I have (loop ... collect (produce-single-item))?
23:27:24
Bike
as an example, see the sbcl manual under 6.2, "At present, SBCL implements stack allocation for"
23:33:35
jmercouris
I've also set-up (slime-setup '(slime-fancy slime-company slime-asdf slime-indentation slime-sbcl-exts))
0:36:38
jeosol
any CL library I could call from the CL side to make an 3d image like this https://www.researchgate.net/figure/Reservoir-simulation-grids-with-2-5-and-10-dip_fig2_254533377
0:37:47
jeosol
it is a set of 3 grid blocks stack together for fluid flow problems. I have the geometry of all the blocks, but I'll write a function so when call, I get a screen with that image and rotate
0:40:03
jeosol
right now, I use paraview (some opensource 3d viewer). I write the input, then fireup that application to view the file. It's too clunky.
0:43:33
jeosol
I recall Baggers has some lisp series about a CEPL library that probably uses OPENGL, that is more like what I'll need. Will check
3:20:23
LdBeth
jmercouris: presentations are some kind of visual elements from CLIM/Lisp Machine UI that you can click them with mouse.
3:22:25
LdBeth
It can be used to provide a repl that one can click the printed objects to inspect them
5:07:46
no-defun-allowed
SBCL runs fine on Windows from my (limited) testing. You can install Portacle and get the install over with quite quickly from portacle.github.io
5:08:07
no-defun-allowed
Windows doesn't have a package manager, so it's probably the most convenient way to get SBCL, Quicklisp, Emacs and SLIME.