345 private links
Validating helps technical understanding as it contributes to awareness of the underlying specifications, and writing valid code is a sign of professionalism
Encoding the malware as an array of UUIDs
A switch input with an Astronaut
minimal HTML, powered by the offset property, responsive.
A css reset.
The font family can be simplified with system-ui.
I don't know if it is pertinent to make the font-size bigger than the user wants it...
Petition to rename Python's init method to boa so we can call them Boa constructors
The business apps are characteristic because their main complexity comes from the domain: which is not hardware/software related but it's more about modelling complexities of human interactions in code.
The author tells Rust is not good for business apps.
- The stdlib abstractions are right in size and scope, but they are lacking concrete implementations (RNG, cryptoghraphy, serialization, ...). The crate ecosystem is enormous, but it takes time and attention to to sift the wheat from the chaff. Attention that is limited and could be put to better use elsewhere.
- Business apps requires solid defaults for common problems that are desired
- Lifetime and mutability modifiers can not be abstracted the same degree as regular generics
- Cyclic data structures are hard in Rust, because of the borrow checker
- The borrow checker also explicitly makes a conservative assumption that if you call method over some reference, this method will try to access ALL fields of that references, forcing any other field accessed outside of it to be invalidated: the structs must be build in respect to the borrow checker.
- Performance of business apps rarely matters, because the underlying
- To gain performance optimization out of Rust, you need more than "it compiles". Its performance ceiling are excellent (some platforms .NET or Swift choose to work closer to the metal), but its time to performance is low: it falls behind many managed languages on that metric.
- Arc/Rc or Box have few issues: this technique of allocating is nowhere near as fast as bump pointer allocators that managed languages use. The actual win here is when we need to release memory: which in Rust doesn't introduce GC pauses.
and moreYou're here to solve business problems, yet on every step you need to solve "plumbing issues", make decisions about memory model including possible feature changes and refactoring they'll require in the future. [...] you're not going to be praised because your asset management app takes 10% less CPU while the task backlog has doubled in the meantime.
This is this piece of code that you realise HTML+CSS are awesome :D
Source code: https://github.com/rust-adventure/lets-code-cli-config/blob/main/src/main.rs
Idea from the comments: Look into unwrap or default and implement the default trait, it cleans up the clutter from where you call unwrap_or
A small crate to check which directory
The library provides the location of these directories by leveraging the mechanisms defined by
- the XDG base directory and the XDG user directory specifications on Linux,
- the Known Folder system on Windows, and
- the Standard Directories on macOS.
From scratch
The author provides a list of hosting too: https://web.pixelshannon.com/make/#:~:text=where%20can%20i%20publish%20my%20website%20for%20free%3F
The post lists as much iterator variants as possible: how they are constructed and what are they signatures.
Why? We want to do more with iterators:
- async iteration
- adress-sensitive (self-referential) iterators
- iterators that can lend items with a lifetime
- conditionnally terminate early
- take external arguments on each call to
.next()
and also because "I've started hearing talk about potentially (soft-)deprecating Iterator." and the author worked on the Node.js Streams WG through the mid-2010s.
When I got started in computers, you had to do low-level bit twiddling to get anything very interesting done, so you pretty much couldn’t avoid learning about XOR. But these days, to a high-level programmer, it’s much more of an optional thing, and you can perfectly well not know much about it.
So I collected some thoughts together and gave a lecture on XOR. Slightly to my own surprise, I was able to spend a full hour talking about it – and then over the course of the next couple of weeks I remembered several other things I could usefully have mentioned.
All of it is available on this page.
Invalid Date in Cobol have a default value.
If the birthdate field contains corrupt or mismatched data, it defaults to 1875-05-20, which serves as a flag. May 20, 1875, is the day the international standards and metrics treaty was signed.
It causes some bugs, such as a 150 year old.... 2025-1975 = 150