freenode/#lisp - IRC Chatlog
Search
8:35:18
Shinmera
Woo, got a complete, working implementation of geometry clipmaps in my Lisp game engine! https://www.youtube.com/watch?v=_qAARn1nOSw
8:48:54
Shinmera
And by the way, my engine uses CLOS all over the place, and pays practically no attention to consing or anything, and it still runs just fine for pretty much everything I've done so far.
8:50:16
Shinmera
Just to give a counterpoint to all the games people (even in here) that constantly brag about how optimised their stuff is.
8:52:03
Shinmera
It has been an issue for me in some cases, like real time audio processing, but most of the time it has not impacted me at all.
8:54:21
Shinmera
Sample conversion and interpolation, various effects and mixing of multiple channels, etc.
8:59:59
dim
I think it boils down to not using generic function in your inner-loops processing, at least that's what I do in pgloader
9:00:39
dim
I mean I use them extensively for preparing the catalogs and all, and not at all when actually reading and re-formating and writing bytes over the network
9:01:42
Shinmera
For my game engine I use GFs in the main draw and update steps all over. It's fine.
9:03:10
shka_
i am under impression that notion about performance of GF is not relevant with current hardware
9:03:29
Shinmera
It depends on the workload. There's definitely overhead and that can be enough to matter
9:03:58
jackdaniel
if you process (say) images, you have loops going over each pixel, so even if gf gives you 1ms, you lose 1s etc
9:07:59
jackdaniel
I don't know what's that supposed to mean: you start to implement fast methods only after you prove that you wrote a complete application which is painfully slow?
9:09:54
shka_
I mean: write prototype, benchmark it. Don't attempt to perform microbenchmarks because results are misleading
9:14:31
heisig
Oh, microbenchmarks can be quite enlightening. Otherwise I wouldn't have figured out that if you do certain MOP things (e.g., calling ADD-METHOD yourself) SBCL switches from fast methods to slow methods.
9:15:09
heisig
That can be an order of magnitude slower. Of course, whether that matters depends on your application.
11:56:13
dim
I can find https://github.com/haskell-lisp/yale-haskell which seems to be a project from 26 years ago
11:57:54
LdBeth
yes. many haskell implementations are deprecated. and i can't find one can be compiled without GHC
12:01:27
LdBeth
beach: it's a compatblity layer made by wrapping a few CL utils and write the rest of world in Scheme style
12:46:03
smokeink
does this look like the proper way to delete an object from the manardb database? http://pastecode.ru/944ee43/
12:54:08
smokeink
by calling that (gc _everything_except_the_obj_I_don't_need_any_more :verbose t) ? that doesn't look right to me, I think I must be missing something
12:55:34
LdBeth
ie, it's the CDR of anthor list which is in everything_except_the_obj_I_don't_need_any_moreĀ
12:56:58
smokeink
if other objects don't hold references to it, then that obj gets destroyed. I pushing adding that obj into a list but that doesn't make it count as "referenced"
13:00:32
Bike
not that i'm familiar with this system, but if you deal with things through a garbage collector, is "delete this particular object" even a thing the system wants you to be able to do?
13:01:45
smokeink
I want to understand in such a system how am I supposed to delete a blog post from the db, for example
13:04:14
smokeink
http://git.elangley.org/edwlan/blogerate.git/blob/ef839cbf4d96b5ee4aa02ab6d82aa6bf64293301/blogerate.lisp
13:05:00
smokeink
this small app here can add blog posts, but shouldn't I also be able to delete them? (by ID for example, since each post has a unique ID)
13:06:36
smokeink
when I create a blog post, I create a unique ID for it. Then in the HTML I can output that ID for the action of a "delete" button for example
13:07:01
jdz
I may have come to the discussion at a wrong moment, but if you know what you want to delete, then obviously you have some kind of a reference, so it seems very wrong to want to "make object referenced".
13:07:57
smokeink
:) you'll have to explain why you think that if an object exists then it must be referenced by something else.
13:08:28
smokeink
it just exists by itself, it's there, floating in the database. And I want to delete it, since nobody wants it any more (and nobody actually rferences it )
13:09:23
Bike
"you'll have to explain why you think that if an object exists then it must be referenced by something else" because otherwise the gc would delete it
13:09:43
Shinmera
No, because if it's not referenced it simply doesn't exist by the programmer's view.
13:10:19
LdBeth
smokeink: if (1 2 3 FOO) is excluded then other references to FOO alse won't be wiped
13:11:29
LdBeth
since after save into db, the #'lisp-object-to-mptr to the save symbol will always return the same mptr
13:16:38
Bike
i'm just saying, practically speaking, if the post isn't referenced from the database, surely gc will axe it
13:18:35
smokeink
if I make another class (let's call it posts) that references individual post objects, and I tell the gc that I don't want to gc posts, then it'll spare all the referenced individual post objs
13:19:14
smokeink
now, is that the right way to work? to have a class post and then another class posts that references post objects ??
13:22:11
smokeink
I used a class with a slot of type sequence. I 'd like to use a simple sequence directly but I am not sure how to access it
13:34:10
smokeink
but after I restart the lisp system I shouldn't call make-instance again, I should read it from the db
13:44:17
smokeink
yes, sure. The issue was how to delete an individual post. It's solved. Now the second issue is whether it's possible to use make-marray for posts , instead of defmmclass
13:45:21
smokeink
you need an array or a class, that references those posts, otherwise you won't be able to delete individual posts
13:46:59
smokeink
you'll be able to store post objects, ... and you'll be able to delete them all. But if you want to delete them individually, you need a parent structure that references them, and call (manardb:gc (list parent_struct1 parent_struct2) :verbose t) , and that will delete only those objects which are not referenced by these parent structures
13:55:16
smokeink
I also hoped for an elegant way... there shouldn't be a need to have both post and posts objects. And then user & users, comment & comments, and so on...