chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] LevelDB bindings


From: Caolan McMahon
Subject: Re: [Chicken-users] LevelDB bindings
Date: Mon, 21 Apr 2014 13:46:44 +0100

Alex: I tried your updated version and it seems to convert cleanly
this time, should be useful for keeping the wiki and REAMDE in sync!

Kristian: thanks for the tips, I wasn't sure how best to name these
delete methods since you don't usually have to manually clean up after
yourself in scheme. I'll have a look at dynamic-wind, I've not used
that yet :)

Daniel: set-finalizer! is interesting. Someone mentioned that in the
IRC channel when I was asking about this. Apparently it's not the best
for performance so I'd like to set a benchmark before trying it out.
If it could avoid me having to use a thunk procedure for db-stream
(which currently cleans up the leveldb::Iterator afterwards) that
would be very nice!

Thanks everyone for reviewing the code, what a friendly mailinglist :D

Caolan

On 21 April 2014 00:58, Daniel Leslie <address@hidden> wrote:
> set-finalizer! Is with considering for memory management as well.
>
> On 20 Apr 2014 16:54, "Kristian Lein-Mathisen" <address@hidden>
> wrote:
>>
>>
>> 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
>>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]