freenode/lisp - IRC Chatlog
Search
23:58:17
krwq
hello, what was that website with current recommendations for libraries? specifically looking for something which would automatically replicate selected objects to the database and restore on start
0:02:14
flavio81
i'm very new to the CL ecosystem to recommend libraries, but two more or less recent ORMs are:
0:02:41
krwq
i just want to i.e. serialize list of some object to a database so that i can i.e. do (def-permanent-var *foo* (first-time-initialize)) and it would always save current state on change and restore same values when i restart my lisp - i never did much with databases
0:03:22
flavio81
with an ORM what you have is objects that have a correspondence with a table on a database, and you can save and load these objects to/from the database
0:03:41
flavio81
but it seems that what you want is to be able to save ANY object. That is "serialization"
0:04:21
flavio81
note that if you want to be able to save ANY object then what you want is a library for serialization, not an ORM
0:04:42
flavio81
a serialization library turns that object into binary (or text) form that then can be stored in a file, a table column, etc
0:04:56
krwq
flavio81: shouldn't there be genreic implementation and i could write my method to help it serialize to db?
0:05:06
flavio81
while what an ORM does is to let you have an Object class that is more or less a mirror image of a database table
0:06:45
flavio81
with this you can create SQL with Lisp code. Then you can use this SQL to 'talk' directly to a database using a library like Postmodern:
0:21:53
krwq
im slightly confused with this connect-toplevel in cl-dbi/datfly/mito, are they interchaangable? i currently use version from datafly, can i replace that safely with mito:connect-toplevel? why are there 3 versions?
0:29:52
flavio81
but i don't understand the question, because mito is an ORM, and datafly is just a DB access library. they are different things
0:33:25
krwq
when i simply depend on datafly system do i need do anything special to make it work with cl-dbi or it autoregisters some keyword for connect-toplevel
0:34:23
flavio81
krwq: yes, but datafly is a traditional database access library (you use SQL to talk to the db), while mito is an ORM (Object-Relational Mapper)
0:37:52
krwq
the example has a keyword as a first argument, but i.e. how do i add my own implementation so it works with it? wrap everything?
4:46:00
krwq
i have a package which is a metapackage for my other packages, is there some easy way to make it such that I can use stuff from other packages before explicitly defining them before (i.e. i'd like to use a:foo in package b and b:bar in package a)
9:40:42
phoe
and I like it as a reading and learning material despite the fact Graham's opinions on a few things (like CLOS) seem pretty unfounded nowadays
9:44:19
AndChat393204
I like about it that there're solutions to the tasks over internet. Cause for now I choose right algorithms but cannot implement them correctly
9:54:53
_death
I wouldn't go by that approach.. other people's solutions are only useful once you solved it yourself.. (loop until (solvedp) do (implement (think (read))))
9:59:47
AndChat393204
I mean that I look in the solutions whether to compare with my solution​ or in case I'm stuck