|
From: | Kristian Lein-Mathisen |
Subject: | Re: [Chicken-users] LevelDB bindings |
Date: | Mon, 21 Apr 2014 01:54:09 +0200 |
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.
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
[Prev in Thread] | Current Thread | [Next in Thread] |