freenode/lisp - IRC Chatlog
Search
12:47:58
pjb
If you use defclass, normally you should write (or update) a update-instance-for-redefined-class method each time you modify the defclass.
12:49:57
pjb
On the other hand, when you write applications (executable images), you have so many times to deal with that it is just easier to avoid data crossing them. Ie. you have to minimize the data that is saved in your image, because most of it would become invalid anyways when the user reboots it.
12:50:35
pjb
all the open files and streams, all the foreign data, foreign libraries, etc. So adding structures to the mix is not a big deal.
12:51:10
pjb
Basically, defvar/defparameter with initial forms is a no-no, instead you set them to nil, and have a initialize function called at boot time.
12:53:16
dim
ok after some careful consideration and a host of optimisation, I now deal with :type '(simple-array (unsigned-byte 8))
12:53:47
pjb
Even the model we're using with slime, where we keep source files in an external file system to be recompiled/reloaded, imposes a development style and structure on the lisp image that is antinomic to the notion of persistent objects.
12:54:17
dim
(rather than using vector-push-extend I now count how many bytes are needed and pre-allocate the result at the right size already) (it costs an extra traversal but I think it's worth it in a memory hungry application)
12:55:14
dim
it's very rare that I have interactive things in cl-user (say) to play with in between calls and refactorings
13:04:15
dim
I usually don't, I have test cases that are more like integration tests than unit-tests, those will recreate all I need
13:04:42
dim
e.g. with pgloader I test my edits with doing a full SQLite or MySQL migration to PostgreSQL, those tests run for 2.5s and 0.6s resp.