-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add find_convex_hull using Graham scan #2889
Conversation
7a6a206
to
b0db1a5
Compare
b0db1a5
to
0861ab9
Compare
Interesting companies are already using Zig even though it hasn't reached 1.0 yet. Do you find there are enough libraries in the Zig ecosystem to be productive ? I'm genuinely interested. I quite like the look of it, but don't fancy rewriting the world. |
@pfeatherstone, well, I did have to rewrite the world, basically. We built a virtual try on for makeup that runs completely on the browser using WebAssembly. Eventually, we got interested in Zig because it has native support for Wasm, and all functions that allocate take an allocator as a parameter. So it's easy to just allocate a bunch of memory from JavaScript, pass it to Zig and create a fixed buffer allocator, and use that as a memory pool. But I had to write everything (some PRs made it into dlib from the C++ version):
It's a nice little language, though. This reminds me of this Tweet:
|
Great work! I still think I'll only start paying attention to Zig when there is something like onnxruntime and a good tasking system. Though it looks like Zig supports coroutines so on the latter point, it seems like that's on its way. In general, these days I hate not being productive. So I'm using Python a lot more and if you use it correctly, the performance gap between Python and C can be quite small. And there is a library for anything possibly imaginable in Python. I basically only use C++ for systems programming now. |
Yeah, this is cool :) |
And the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, much nicer, thank you!
Co-authored-by: Davis E. King <[email protected]>
Thanks, this is great :) |
So, I know I've not been very active on dlib really...
The thing is, at my current job I am using Zig quite a bit, and therefore, not using dlib as much as I'd like.
However, today I had to compute the convex hull of a set of points at work and checked if an implementation on dlib existed to port it to Zig, but I couldn't find it.
So I coded it in Zig, and now I am back porting it to dlib, as I think it may be useful.
Let me know if you think the stuff in the
impl
namespace should also be exposed to the users.