I just finished writing and publishing
[wbt_nim]([https://github.com/jblindsay/wbt_nim](https://github.com/jblindsay/wbt_nim))
a Nim-based API for the
[WhiteboxTools]([https://jblindsay.github.io/wbt_book/preface.html](https://jblindsay.github.io/wbt_book/preface.html))
geospatial data
Thanks, I'll look into it.
No, you're right, it allows for it to be adjusted at compile time. I don't
think that I've ever seen a k-d tree library that allows for K to be set at
runtime. I can't think of a use-case for this. For one, I would think it would
come at a large performance hit.
There is a genericK branch on the GitHub page. It's fully operational, but I am
experiencing challenges with the code. For one, it seems to kill VS Code's
ability (nimsuggest, actually, I suspect) to work with the code. And it is
significantly slower, which I can't quite understand. I had
I can't say that I'm familiar with an UncheckedArray. Is there any
documentation for it? I can't seem to find any after a quick search.
Well that was embarrassing. I've fixed the 'I' 'e' spelling throughout and
committed the changes. Thank you for noticing that. As a Canadian, I can't
approve the 'or' over 'our' spelling however! All the English speakers in the
UK, Canada, Australia, New Zealand, South Africa, etc. wouldn't be
@b3liever Thanks for the catches. I've just pushed the changes now.
It seems to work within VS Code for me, with autocomplete working as expected.
That said, I'm not sure if it would work with others. The only generic
parameter in it is with the data associated with points.
I'm not sure if it works with nimsuggest. I'm still just experimenting with Nim
and am not all that knowledgable of it's larger ecosystem. Is there a way that
I can check if it works with nimsuggest?
I've seen your RTree implementation and it's quite impressive!
I have created a pure Nim k-d tree implementation
([https://github.com/jblindsay/kdtree)](https://github.com/jblindsay/kdtree\)).
It's rather flexible compared with many existing k-d tree libraries, allowing
for single and multiple nearest neighbour searches, within-radius (circular
search
@dom96 Thank you very much for your reply. Having an open and transparent
pathway to 1.0 is going to be so important for the community and for fostering
adoption. Thank you for all of your efforts. I just had my new Nim book arrive
in the mail this week. Can't wait to read it!
@dom96, Very interesting! Any hints that you may provide on the timeline for
the 1.0 release? I know that there are a lot of people who are waiting until
1.0 hits before seriously looking at Nim and so this is quite a big deal. If it
is coming very soon then that could be quite interesting. Is
Congratulations Dom! It's quite an achievement both personally and for the Nim
community, which will undoubtedly benefit greatly from having a current book
focussed on the language. I'm very much looking forward to receiving my copy in
the mail this winter and thanks for putting the effort into
@Araq, wow, moving the code to a 'main' proc rather than 'when isMainModule'
made the compiler optimize away the for loop entirely. I wasn't expecting that
to happen :) .
Stefan, you're absolutely right to mention this. In fact, my original testing
was simply running the program from Atom using the Script add-on...so who knows
how it is configured to run in this case. So I ran it from the command line
using
nim c --run -d:release --verbosity:0
@Krux02, yes, the data that I will be reading will vary in endianness, which
adds an extra complication for this. In the case where the file's endianness
does not match the machine's, I intended to perform byte swapping. @Araq, I'm a
little surprised by this. I had done a quick performance
Ar, I believe that I do need the seq since I am reading the bytes in
from a file. lucian, your solution looks quite interesting. I'll have to
explore this option further. Thanks.
Yep, that's it. You did it! It seems really strange to me that that empty []
needs to be placed after the cast to dereference it. Shouldn't s be
dereferenced by the [p] within the cast? Anyhow, I'm very thankful to have a
solution and am grateful for all your time spent finding it.
Ha! Looks like we're both experimenting with the same solutions unsuccessfully.
I'm sure someone out there knows what we're doing wrong :). Anyhow, thank you
very much for giving it a go.
Thanks for your reply Stefan. Yes, my code works fine. It's just that I have to
run it many millions of times and so I was concerned that it may not be the
most efficient means of accomplishing the conversion. If there is a standard
one-operation method that I'm not aware of, then I thought it
Just as the title suggests, what is the recommended way of converting a
sequence of four uint8's into a uint32? Or even more specifically, how would
you convert four consecutive bytes within a larger sequence into a uint32? At
the moment, I'm doing this:
var offset = 0
var x =
have had to purchase it through
Manning to do that instead. January seems like a long time to wait for the hard
copy to be shipped! Thanks.
jlindsay
I think I've answered my own question. I saw on the Manning webpage:
> Q: Can I buy a MEAP anywhere else?
>
> No. Currently, MEAPs are available exclusively at manning.com.
So looks like I'll have to wait until January. Oh well, it'll be a nice New
Year surprise.
23 matches
Mail list logo