362 private links
Handy :)
what if, instead of taking a mutable reference to the entire State, we only took a mutable reference to the fields we wanted?
A fast hashmap algorithm if the one of the standard library is not enough.
IDK if the collision rate is higher than the std library though. Hashbrown uses AHash as algorithm for hashing. --> it does not provide cryptographic secure hashes though.
Another use case is when std is not available (because the randomness is not available in the environment / OS).
Definitely worth. It's great to have high quality articles such as these.
Style the parent based on how many children there is in it. Awesome!
Interesting to have a language than can tradeoff precision for speed.
Numba make python code faster and the author spent months to build in C++ instead of days with Numba.
The last one is assymbly directly... it seems similar to C in the new versions! ForwardCom is also interesting as it's an "open forward-compatible instruction set architecture".
Damn look at this:
v0 = my_vector // we want the horizontal sum of this
int64 r0 = get_len ( v0 )
int64 r0 = round_u2 ( r0 )
float v0 = set_len ( r0 , v0 )
while ( uint64 r0 > 4) {
uint64 r0 >>= 1
float v1 = shift_reduce ( r0 , v0 )
float v0 = v1 + v0
}
If I trade C++ for “not C++”, 80% of my work will remain exactly the same. C++ is simply irrelevant to most of what I do. Could it mean that for me C++ is already 80% dead?
Interesting thoughts though!
Buffers can help before writing everything to the standard output.
Original solution in image: https://techhub.social/@mrolemadelen/112105972218076605
How to get the context of a request, useful for logging
A small JavaScript library to create and animate annotations on a web page.
Nice. With a bit of interactivity, the user can highlights everything.
During the development of Bear, one of the constraints I created for myself was to do as much as possible using basic HTML components. This means that the only elements that are able to perform a request are and
A simple snippet works to retrieve and replace content on a page. Few thoughts:
- It has to work with other interactions than the click event to be reliable
- It has to work with screen readers, so the focus should be placed on the inserted content. Maybe an announcement is needed.
The author tried it with PHP, but it somehow didn't work.
It can be useful to create a distinction between iterators and traversables.
I created a Cargo subcommand called cargo-wizard that simplifies the configuration of Cargo projects for maximum runtime performance, fastest compilation time or minimal binary size.
Cross-posting on multiple platform.
The project is hosted on Github: https://github.com/rknightuk/echo
It can be useful :)
- Writing mode
- Gap in flex or grid layouts
- Flip with transform
- scroll-behavior: smooth;
- Scroll-snapping with
scroll-snap-typefor the container andscroll-snap-alignfor the children - Resize elements both with
overflow: auto; resize: both; - Line clamp based on how many lines is expected.
- Linear gradient and apply the gradient on text only
object-fit: coverto avoid the fill effect of images. The image is not fully displayed thoughts.pointer-events: none;make elements not selectable anymore.
Well I knew them 😁