One change to make this library more idiomatic would be to make HyperLogLog avoid forcing heap allocation on the user. So from this (simplified code): pub fn HyperLogLog(comptime p: u8) type { return struct { dense: []u6, const Self = @This(); pub fn init(allocator: Allocator) !Self { return Self{ .dense = try allocator.alloc(u6, 0), }; } } } To this: pub fn HyperLogLog(comptime p: u8) type { return struct { dense: […
Show HN: HyperLogLog in Zig
21–30 of 38 posts
Re: Show HN: HyperLogLog in Zig
#22One change to make this library more idiomatic would be to make HyperLogLog avoid forcing heap allocation on the user. So from this (simplified code): pub fn HyperLogLog(comptime p: u8) type { return struct { dense: []u6, const Self = @This(); pub fn init(allocator: Allocator) !Self { return Self{ .dense = try allocator.alloc(u6, 0), }; } } } To this: pub fn HyperLogLog(comptime p: u8) type { return struct { dense: […
Why is Zigs syntax so … foreign to me? What’s the hype behind it?
Re: Show HN: HyperLogLog in Zig
#23Looks cool. What are some applications of a cardinality estimator?
Re: Show HN: HyperLogLog in Zig
#24Earlier quoted context omitted.
I'm also very curious to know this. HyperLogLog is written in Go: https://github.com/axiomhq/hyperloglog I would expect V to be a more natural choice for a port than Zig.
As a notice to others reading this user's comments, they are a recently made account that seems to exist mostly to post about V and post negatively about Zig. Extremely suspect given the history of poor behavior from the V project.
I work professionally with Go and I follow news about V, yes. Also I'm interested in discussions involving Zig and V because even though there is an overlap of the design goals of the languages (e.g. zero-cost interoperability with C, high performance), there aren't many comparisons between them online.
My advice is listen to the criticism of Zig to improve the language instead of making throwaway accounts to accuse people.
Re: Show HN: HyperLogLog in Zig
#25Re: Show HN: HyperLogLog in Zig
#26Re: Show HN: HyperLogLog in Zig
#27One change to make this library more idiomatic would be to make HyperLogLog avoid forcing heap allocation on the user. So from this (simplified code): pub fn HyperLogLog(comptime p: u8) type { return struct { dense: []u6, const Self = @This(); pub fn init(allocator: Allocator) !Self { return Self{ .dense = try allocator.alloc(u6, 0), }; } } } To this: pub fn HyperLogLog(comptime p: u8) type { return struct { dense: […
Why is Zigs syntax so … foreign to me? What’s the hype behind it?
You're just looking at a piece of code that is understandable for a newcomer to not find familiar.
Re: Show HN: HyperLogLog in Zig
#28Earlier quoted context omitted.
I'm also very curious to know this. HyperLogLog is written in Go: https://github.com/axiomhq/hyperloglog I would expect V to be a more natural choice for a port than Zig.
As a notice to others reading this user's comments, they are a recently made account that seems to exist mostly to post about V and post negatively about Zig. Extremely suspect given the history of poor behavior from the V project.
Re: Show HN: HyperLogLog in Zig
#29Earlier quoted context omitted.
As a notice to others reading this user's comments, they are a recently made account that seems to exist mostly to post about V and post negatively about Zig. Extremely suspect given the history of poor behavior from the V project.
You made this account just to insinuate I'm a shill? Not cool. I work professionally with Go and I follow news about V, yes. Also I'm interested in discussions involving Zig and V because even though there is an overlap of the design goals of the languages (e.g. zero-cost interoperability with C, high performance), there aren't many comparisons between them online. My advice is listen to the criticism of Zig to impro…
Re: Show HN: HyperLogLog in Zig
#30Earlier quoted context omitted.
You made this account just to insinuate I'm a shill? Not cool. I work professionally with Go and I follow news about V, yes. Also I'm interested in discussions involving Zig and V because even though there is an overlap of the design goals of the languages (e.g. zero-cost interoperability with C, high performance), there aren't many comparisons between them online. My advice is listen to the criticism of Zig to impro…
I agree that the criticism is unfair because you've posted about other things as well. However, it's true that you've posted in the programming language flamewar style in the past; we're trying to avoid that here, so please don't do that in the future. https://news.ycombinator.com/newsguidelines.html
I meant to ask my question in the spirit of HN (intellectual curiosity). I have found this community insightful when it comes to programming languages. Examples:
Vale
https://news.ycombinator.com/item?id=31786487
Lobster
https://news.ycombinator.com/item?id=19567160
I think this question will also be raised eventually since there have been other examples of Zig ports of Go projects:
https://news.ycombinator.com/item?id=31993429#31994394
I'm looking forward to OP's update. I believe it will be objective and insightful (surprisingly Google returns 0 results of "vlang vs. zig").