nimrtlsdr wraps the rtl-sdr library in a (hopefully) idiomatic Nim way.
If someone better versed in Nim than myself wouldn't mind skimming through nimrtlsdr.nim for anything glaring or obvious I'd really appreciate it. Although the wrappers are fairly simple there are a few places where I'm uncertain if I'm connecting Nim with C in an optimal way or not. The example app does run really well with my DVB-T dongle, which is nice.
Thanks
I can't verify whether the code itself is correct, however I would suggest you look at Nim Style Guide .
I do like the documentation you inserted, it's a nice touch that, unfortunately, not many wrapper authors add.
Doh. I've been so focused on the language and library docs for the past couple of weeks I completely forgot to look at the style guide. Thanks! As far as comments go, BlaXpirit's recent SFML wrapper was the inspiration.
On a side note. As much as I like to think I'm flexible and open minded when it comes to programming languages, 2 character indention does not make for a pleasant experience when reading Nim code, at the moment. At least if tabs were allowed; and enforce one or the other and not a mix, a user would have the personal option on indention width based on his/her personal preference.
At least if tabs were allowed; and enforce one or the other and not a mix, a user would have the personal option on indention width based on his/her personal preference.
You can use source code filters -- I do for my private code:
http://nim-lang.org/filters.html
http://irclogs.nim-lang.org/17-01-2014.html
add this at the top of your file (no quotes) : "#! replace("\t", " ")"