<char[m]>
copy-list guarantees they are not eq. If I have a bunch of instances and two are eq, I want to know about it (like the exampleedgar-rft gave.
wonko-the-sane has joined #commonlisp
wonko-the-sane has quit [Ping timeout: 255 seconds]
mason has joined #commonlisp
masinter has quit [Ping timeout: 268 seconds]
pranavats has left #commonlisp [Disconnected: Hibernating too long]
Oladon has quit [Quit: Leaving.]
Everything has quit [Ping timeout: 268 seconds]
pranavats has joined #commonlisp
mingus has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
nij- has quit [Quit: Using Circe, the loveliest of all IRC clients]
<gendl>
Happy New Year back at ya!
aartaka has joined #commonlisp
waleee has joined #commonlisp
scymtym has quit [Remote host closed the connection]
scymtym_ has quit [Remote host closed the connection]
Brucio-61 has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 246 seconds]
jolby has joined #commonlisp
peterhil has quit [Quit: Leaving]
count3rmeasure has joined #commonlisp
aartaka has joined #commonlisp
scymtym has joined #commonlisp
Brucio-61 has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
pranavats has left #commonlisp [Error from remote client]
nij- has joined #commonlisp
igemnace has joined #commonlisp
aartaka has joined #commonlisp
jolby has quit [Quit: Client closed]
rainthree has quit [Ping timeout: 272 seconds]
waleee has quit [Ping timeout: 252 seconds]
epony has joined #commonlisp
rigel has joined #commonlisp
rigel has quit [Client Quit]
_cymew_ has quit [Ping timeout: 260 seconds]
igemnace has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
nij- has quit [Quit: Using Circe, the loveliest of all IRC clients]
count3rmeasure has quit [Ping timeout: 260 seconds]
pranavats has joined #commonlisp
jolby has joined #commonlisp
jolby has quit [Client Quit]
jolby has joined #commonlisp
eddof13 has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
son0p has quit [Ping timeout: 260 seconds]
cage has joined #commonlisp
Oladon has joined #commonlisp
attila_lendvai has quit [Quit: Leaving]
count3rmeasure has joined #commonlisp
attila_lendvai has joined #commonlisp
waleee has joined #commonlisp
rainthree has joined #commonlisp
johnjaye has quit [Ping timeout: 260 seconds]
johnjaye has joined #commonlisp
rainthree3 has joined #commonlisp
rainthree has quit [Ping timeout: 268 seconds]
jmdaemon has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 28.2]
perrierjouet has quit [Ping timeout: 246 seconds]
NotThatRPG has joined #commonlisp
<NotThatRPG>
Happy New Lispy Year everyone.
<masinter>
do SBCL threads work?
rainthree3 has quit [Ping timeout: 260 seconds]
<NotThatRPG>
I was wondering -- does anyone have any suggestions for developing load forms for very large data structures? Just set one up, and my naive approach leads to enormous file sizes. code that runs fine to generate the s-expressions corresponding to the load form takes just forever to emit that code to file.
<NotThatRPG>
masinter: What do you mean?
<NotThatRPG>
I figure it's not a good sign that one of my load-form files is 721M, but compresses to 21M!
varjag has joined #commonlisp
<jackdaniel>
NotThatRPG: say that your form is (define-not-that-rpg-fancy-something :a 4 "foo"), and you have 1000000000 of them
<jackdaniel>
you'd save up space if you did (mapc (lambda (val) (define-not-that-rpg-fncy-something (first val) (second val) (third-val))) '((:a 4 "foo") (:d 8 "bar") ...)))
<NotThatRPG>
jackdaniel: I have something that is pretty large and has to be rebuilt in two phases: the first phase involves populating an array with entities, and the second phase involves connecting those entities by dereferencing through the array.
<NotThatRPG>
This involves a lot of ugly structure slot setting and array entry setting that gets very large.
<NotThatRPG>
Also, it's somewhat mysterious if I can make effective use of the ENVIRONMENT argument to MAKE-LOAD-FORM.
<NotThatRPG>
For example, I don't see how to use the environment to hold on to that array data structure, without which it's hard to take advantage of M-L-F's ability to provide both a creator and an initializer.
_cymew_ has joined #commonlisp
<Bike>
the environment argument is most probably an empty lexenv. not really useful except for completeness. if i remember correctly, the XJ issue says they put it in just on the general principle that forms are technjically meaningless without environments.
<Bike>
you are supposed to use the literal in the form in order to get a hold of it. like, you make your initializer with `(install-thingie ,array). the compiler will then resolve the literal reference so it's not duplicated.
townsfolkPravda has joined #commonlisp
<Bike>
so you shouldn't need to put anything in the environment to reference elsewhere; the compiler sort of does that for you, in this weird way.
<Bike>
If you're only using the array for connecting the entities together, it shouldn't be necessary, because that is what the loader does for you. Say you have a doubly linked list with node objects with "prev" and "next" fields. Then given a node, your make-load-form method could just return an initializer of `(setf (next ,node) ,(next node) (prev ,node) ,(prev node)), node being the object passed to m-l-f.
<Bike>
this is more or less what make-load-form-saving-slots does for you.
<Bike>
wow, that message split pretty nicely
count3rmeasure has quit [Ping timeout: 268 seconds]
<Bike>
hopefully this makes any sense. i have all this loaded up in my brain right now since i'm in the middle of reimplementing it for clasp
wonko-the-sane has quit [Ping timeout: 255 seconds]
perrierjouet has joined #commonlisp
wonko-the-sane has joined #commonlisp
<dbotton>
masinter - sbcl threads work very. CLOG heavily relies on it for example
<dbotton>
I assume you saw some reference to issues on Windows that was years ago and 32 bit
tyson2 has quit [Remote host closed the connection]
<NotThatRPG>
Bike: I'm not sure why the array is not necessary -- the load-form will ensure that the NEXT slot of the new node gets a the corresponding value for the next slot of the original node? How would it know to do that in general?
random-nick has quit [Ping timeout: 268 seconds]
<NotThatRPG>
So I have a tree-structured object that also has parent links. You are saying that the compiler will automagically align the elements of the CHILDREN vector of a parent with the corresponding children in the original tree?
<Bike>
NotThatRPG: the loader basically does the array for you. it knows because it looks through the creation and initializer forms looking for literals, and makes sure that at load time those forms are executed with the literals it's reconstructing.
<NotThatRPG>
No kidding! That's awesome!
random-nick has joined #commonlisp
<Bike>
yeah, it's a really involved part of the language and also very obscure.
wonko-the-sane has quit [Ping timeout: 255 seconds]
<Bike>
the m-l-f page has a basic example showing this, though without circularity, and describes it in the uh, 6th and 7th paras of the description, though a little vaguely (like what is a "reference")
<Bike>
the basic rule to keep in mind is that if the source code being compile-file'd contains objects that are eql to each other, the corresponding objects at load time must also be eql to each other, and the implementation has to jump any hurdles to doing this. and the creation/initialization forms returned by make-load-form are part of the source being compile-file'd.
rogersm has joined #commonlisp
tyson2 has joined #commonlisp
VincentVega has joined #commonlisp
genpaku has quit [Remote host closed the connection]
attila_lendvai has quit [Ping timeout: 260 seconds]
genpaku has joined #commonlisp
_cymew_ has quit [Ping timeout: 260 seconds]
Madsy has quit [Remote host closed the connection]
Madsy has joined #commonlisp
chrcav has quit [Quit: Lost terminal]
masinter has quit [Ping timeout: 260 seconds]
puchacz has quit [Quit: Client closed]
akoana has joined #commonlisp
varjag has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
shka has quit [Ping timeout: 252 seconds]
akoana has quit [Quit: leaving]
Oladon has quit [Quit: Leaving.]
azimut has quit [Ping timeout: 255 seconds]
notzmv has quit [Ping timeout: 248 seconds]
rendar has quit [Ping timeout: 260 seconds]
<mfiano>
Also worth noting is SBCL is much more forgiving when it comes to UB in this area. Something with a more strict default compiler policy, like CCL, will yell loudly if a load form needs to be available for an object. SBCL lets it slide.
<mfiano>
I am fairly sure, even without a style warning
<phoe>
how?
<mfiano>
how what?
<phoe>
how does it let it slide?
<mfiano>
Sorry, I wasn't clear.
<mfiano>
I have a project where I define a class whose only purpose is for a single instance to be bound to a 'constant variable'. With CCL, said constant cannot be bound following the definition of the class in the same file, unless the class is eval-when'd. CCL will error. SBCL does nothing and just works.
<phoe>
so something like (progn (defclass foo ...) (defconstant ... (make-instance 'foo))) ?
<mfiano>
Si
<mfiano>
Well no
<mfiano>
Hold on
<Bike>
I get an error if i try that on sbcl (but about foo being undefined, not a make-load-form thing)
<ixelp>
cricket/open-simplex2s-2d.lisp at master · mfiano/cricket · GitHub
<mfiano>
With the eval-always (eval-when with everything), this will error on CCL but not on SBCL.
<mfiano>
(or the make-load-form
<Bike>
still an error for me.
<Bike>
with (defstruct foo) (defconstant +foo+ (make-foo)). says make-foo is undefined.
<Bike>
i am pretty sure sbcl tries to evaluate constants at compile time
<mfiano>
Interesting. Might have improved then and it was at the time pointed out to me that it was UB, and I foolishly didn't look too deep into it
<mfiano>
Ah that must be it
zyni-moe has joined #commonlisp
notzmv has joined #commonlisp
<mfiano>
Well please ignore me then. I have only used m-l-f a handful of times, and I remember needing it to please CCL but not SBCL a year or so ago when that code was written.