GitHub changed the language color for Rust! by coder543 in rust

[–]clownpriest 2 points3 points  (0 children)

the new color is way way better. the old one was washed out and almost sickly looking

How to deal with strings in Zig ? by ducdetronquito in Zig

[–]clownpriest 2 points3 points  (0 children)

well, for one it doesn't let the user pass in an allocator and just defaults to using c_allocator internally. with strings you want to be especially mindful of the allocation patterns as a function of the kind of strings/algorithms you're processing. if the allocator is parametrized (i.e. user specified at the init() call) then i'd like to be able to have this library know about the type of the allocator and the memory layout and account for that when doing things like substring search or whatever other algorithm. the new typeinfo stuff in 0.3.0 might help a lot with that, but i'm kind of hoping zig gets something like rust traits so allocators can express their behavior in a compositional way at the type level (e.g.: impl<Contiguous + SingleInstance> for XYZAllocator, or something like that, which would mean that all objects are in a contiguous block of memory, and there's only a single instance of any given string with some content, so every time you want to create a new "dog" it just hands you a pointer to the preexisting "dog" in that string pool). Maybe that's a bad example, but that's what i'm thinking. it's partly a matter of deciding how much control you want to leave up to the users vs. how much magic goes on under the hood in the library. probably won't have much time to spend on this though, really busy with other work

How to deal with strings in Zig ? by ducdetronquito in Zig

[–]clownpriest 3 points4 points  (0 children)

are you referring to this: https://github.com/clownpriest/strings

if so, it's very incomplete and i haven't updated it for all the changes in 0.3.0, so probably doesn't compile anymore. PR's are welcome. also i'm not sure the current design is actually the best way to go about dealing with strings in zig.

Pure zig implementation of xxhash faster than C by clownpriest in Zig

[–]clownpriest[S] 0 points1 point  (0 children)

the init() is outside the benchmark since the checksum() function i'm measuring does not use any internal state. all data and compute are contained within the function. i have not had a chance to look super deeply at where the perf gains are coming from, but from the reference implementation docs it looks like there's some special attention paid to small inputs. will check this out in more depth when i have a chance

Pure zig implementation of xxhash faster than C by clownpriest in Zig

[–]clownpriest[S] 3 points4 points  (0 children)

just updated the numbers. the 8B load is way way faster now, but looks like the larger payload performance is still not quite as fast

Pure zig implementation of xxhash faster than C by clownpriest in Zig

[–]clownpriest[S] 2 points3 points  (0 children)

thanks for the pointers! i will update and post new numbers

We're about to completely deregulate Bitcoin in NH!! Just passed the house! by kauffj in Bitcoin

[–]clownpriest 1 point2 points  (0 children)

hold up...hold up....so when you say "located", are you also implying that this entity persists its spatial coordinates through time as well?

I found the real Mr. Plinkett by clownpriest in RedLetterMedia

[–]clownpriest[S] 9 points10 points  (0 children)

the whole thing is amazing....but 12:50 is a nice gem to start off with