|
From: | Daniel Leslie |
Subject: | Re: [Chicken-users] LevelDB bindings |
Date: | Sun, 20 Apr 2014 16:58:06 -0700 |
set-finalizer! Is with considering for memory management as well.
Hey Caolan,And welcome to the Chicken community! Your leveldb eggs seems pretty well written, nice work! Not much to comment on, but I'll put down what I noted as I quickly browsed through the code.
Have you looked at the bind egg? It may help you out with basic C++ bindings for things like class instantiation, methods and fields.
In your leveldb.setup file, you can use capital -j and leave out the module name.
In you call-with-db definition, you could probably do the same with less code using dynamic-wind.
And a quick note on naming conventions. I noted you've got things like strings->slice, where the return value needs to be freed with delete-slice. Since that's just private api, I'm sure you'll get away with it. I wonder though, if there's a a way to indicate you need to be careful. Perhaps a % prefix or * postfix might be suitable.
Or perhaps a call-with-slice convention that always deletes with dynamic-wind might be suitable? I don't know its performance properties, though.
Same for check-status, which deletes its argument with delete-status. Perhaps a ! postfix, ie "check-status!"?
I hope I can get to play around with leveldb and thus egg at some point! Thanks for your contribution!
K.
On Apr 20, 2014 3:00 PM, "Caolan McMahon" <address@hidden> wrote:Hi all,
I'm new to the list (and CHICKEN) *waves*
I thought I'd have a go at writing an egg and put together some
bindings to Google's LevelDB embedded key/value store. I've published
it at https://github.com/caolan/chicken-leveldb
Can someone please help me with getting it onto the egg index? I'd
also appreciate any advice people have on coding style / egg layout
etc. since I'm still getting the hang of this.
Thanks,
Caolan
_______________________________________________
Chicken-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/chicken-users
_______________________________________________
Chicken-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/chicken-users
[Prev in Thread] | Current Thread | [Next in Thread] |