]]>what if, instead of taking a mutable reference to the entire State, we only took a mutable reference to the fields we wanted?
— Permalink
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.
— Permalink
Style the parent based on how many children there is in it. Awesome!
— Permalink
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!
— Permalink
Buffers can help before writing everything to the standard output.
Original solution in image: https://techhub.social/@mrolemadelen/112105972218076605
— Permalink
How to get the context of a request, useful for logging
— Permalink
A small JavaScript library to create and animate annotations on a web page.
Nice. With a bit of interactivity, the user can highlights everything.
— Permalink
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:
The author tried it with PHP, but it somehow didn't work.
— Permalink
It can be useful to create a distinction between iterators and traversables.
— Permalink
Part 2: https://www.smashingmagazine.com/2024/03/modern-css-tooltips-speech-bubbles-part2/
— Permalink
]]>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
— Permalink
It can be useful :)
— Permalink
scroll-snap-type
for the container and scroll-snap-align
for the childrenoverflow: auto; resize: both;
object-fit: cover
to 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 😁
— Permalink
A kind is a type constructor that takes a type, and produces a new type.
The quthor recreates a map function
— Permalink
The Mozilla Documentation Network published a curriculum to become a frontend developer.
It seems to contain relevant resources, also for confirmed developers.
— Permalink
]]>What's your favorite solution for not-quite-component components?
With those I mean components that are more boilerplates to be expanded upon, instead of actual ready-to-go components you just tweak a few details of. Components that would grow too complex if you'd need to account for all possible interaction and design versions through props or CSS custom properties.
I think often the alternative is composability: ie. what's the minimum functionality that the cookie consent component could have? Could it be a wrapper that provides cookie-setting functionality to whatever UI component it wraps? Could it be a little JS module different components could import to reuse?
— Permalink
Now I get it.
— Permalink
How to apply css for RSS feeds
— Permalink
Maybe useful for later
— Permalink
Every couple of years in software development, the meta changes. Libraries and frameworks are rotated in and out of popularity, languages evolve and best practices change. These are some of my personal beliefs1 on what the current meta is, and what parts are worth adopting.
Now is better than never.
Although never is often better than right now.
Find relevant indexes to set based on the usage of the postresSQL database.
— Permalink
Avoid a round trip for the slow start TCP algorithm. Depending of the internet connexion it can save 100s of ms.
— Permalink
]]>This cookbook is intended for new Rust programmers, so that they may quickly get an overview of the capabilities of the Rust crate ecosystem. It is also intended for experienced Rust programmers, who should find in the recipes an easy reminder of how to accomplish common tasks.
— Permalink
How to link webmentions.io messages, likeCount, replyCount and reportCount to a personal blog with a few JS lines.
— Permalink
A great media query for example disabling custom fonts!
— Permalink
]]>Project Wallace is a set of CSS analyzers that check your complexity, specificity, performance, Design Tokens and much more. And all of that in a single web app.
— Permalink
A list of triangle shapes that can be reused
]]>background-repeat: space
makes the background kind of responsive.
— Permalink
]]>If you implemented this, and then you deleted all but one of the call sites, would you be tempted to inline the abstraction? If yes, you shouldn’t do it.
— Permalink
More techniques than Resource: The Complete Guide to Centering in CSS | Modern CSS Solutions.
It covers a lot of cases:
As I write this in early 2024, browser vendors are in the process of implementing align-content in Flow layout, so that it controls the “block” direction alignment of content.
🤯 so we will be able to stick to the default layout.
]]>So, for many years, I treated CSS like a collection of patterns. I had a bunch of memorized snippets that would paste from my brain, to solve whatever problem I was currently facing.
A JS-Logger library
— Permalink
An example of API testing in Cypress
— Permalink