Original link: https://limboy.me/links/2022-44/
Web Programming
Is Turbopack really 10x Faster than Vite?
Last week, Vercel released Turbopack , successor to Webpack
(after all, it was built by the father of Webpack, Tobias Koppers). This article shows in bold text: updates 10x faster than Vite , but after a big test , I found that this is not the case (The specific test content and test process are mentioned in the article, and Vercel later released the test process and test report ).
Data is easy to grab attention because we are too sensitive to numbers, but also to see what these numbers mean, how they came about, are there any other more important numbers not mentioned?
OKLCH in CSS: why we moved from RGB and HSL
oklch is a new way to write CSS Color like this:
a:hover { background: oklch(45% 0.26 264); /* blue */ color: oklch(100% 0 0); /* white */ color: oklch(0% 0 0 / 50%); /* black with 50% opacity */ }
LCH stands for: perceived luminance (Luminance), chroma (Chroma), and hue (Hue). Why launch this new way of writing, which involves the insufficiency of the existing color space. A color space is a specific combination range of colors. For example, the maximum value of RGB in the three directions of red, green and blue is 255, which can be described as a cube, while HSL (Hue, Saturation, Lightness) can be described as a cylinder. body:
The problem with RGB is that it’s machine friendly, but it’s hard to identify directly (like what color is rgb(131, 103, 210)
?), and tweaking one component can have unpredictable effects on the result.
HSL presents colors through different dimensions, and partially solves the problem of RGB, such as adjusting L, you can know that it will not change from red to brown, but only change the brightness of the color. The problem with it is that it is not friendly to the human eye, that is, it is numerically uniform. It may not appear to the human eye, because human visual perception is not uniform, and the wavelength of color has different influences on the three types of human cone cells. .
OKLCH can be considered as a color space adjusted for the human eye, and the L in it has also become “perceived brightness”, so that the same L looks similar to the brightness of the human eye, and you can experience the effect online .
PS: This article has a more detailed description of the color system, which can be read together.
Xata
A data service that has just been launched recently, is briefly described as follows:
Xata is a serverless database with built-in powerful search and analytics.
One API, multiple type-safe client libraries, and optimized for your development workflow.
The concept is similar to PocketBase , but it is more powerful. It packages Database (PostgreSQL), Search (ElasticSearch), and Analytics into one service (Cell), supports edge node acceleration, and can use these services through a unified REST API. It is very convenient to operate Data / Scheme in the background. For the specific principle, please read this article .
PS: The price is quite friendly, and Free Tier is basically enough for the data service of Personal Project.
Buddy
An online CI/CD service is more convenient to use than Github’s Actions. Common operations are encapsulated into draggable Blocks, and then some parameters are set. Use this video to learn how to use it.
Remix web framework required by Shopify
Shopify has acquired Remix, some people are optimistic, some people are bad. This article talks a lot about this acquisition. There are also related discussions on Hacker News. If you are interested, you can read it. I have developed several projects with Remix, and the experience is quite good. I hope it can continue to improve and develop in a better direction.
Libraries
- React Arborist , a powerful React Tree Library (Arbor means Tree in Latin), recently released version 2.0.
- React Toastify is a powerful, high-value Notification Library with nearly 10,000 Stars.
Cool Stuff
Excalidraw
Excalidraw is a hand-drawn style drawing board that has recently been redesigned and looks more comfortable.
Under the co-construction of the community, many Shapes have been supported, and it is more convenient to make flowcharts and prototypes, and can even be used to draw
Relingo
An English learning tool based on a browser plug-in, you can set your own vocabulary , and automatically translate the new words and difficult words in the web page (according to the set new words to decide whether to translate a word), help you quickly understand the content of the article, and also Support word/paragraph translation. The paid version enhances the ability to “remember words” (such as Flashcard, creating a new word book, etc.), if you just browse articles, the free version is basically enough.
Potluck: Dynamic documents as personal software
The core idea of this article is as the title says: Dynamic documents as personal software. Dynamic
is the key point here. Generally, text-based Documents lack the characteristics of software. For example, after clicking a button, you can change some behaviors, or link between texts (similar to excel, modify A, and other related places will also be automatically updated). And Dynamic Documents
is to blur the boundaries of software, and incorporate some features that are usually found in software into Document.
This one is very reminiscent of Notion or Feishu documents . But there is a big difference. These document systems have format requirements for extensions that can insert text. That is, the system formulates a template, and then you fill the template with content.
Potluck, on the other hand, does not limit the text content, finds matching items through pattern
, and then performs some Actions on these matching items or provides some additional capabilities (such as Slider, or a countdown button), which can be experienced online. Down
The advantage of this is flexibility, you can build all kinds of wonderful patterns, and perform some custom effects on the content that satisfies the pattern. But there are also several problems: 1) The writer is not aware of the pattern and does not know how to hit the pattern. 2) The flexibility of customization is limited. For example, if you want to match a table and perform some actions on the items in the table, it will be more troublesome to implement. But it does provide a new idea, maybe a combination of Dynamic documents and Extensible documents (like Notion)?
Thinking of markdoc , you can use custom tags in markdown, the processing rules of these tags can be defined in advance, and finally these tags can become a button or other interactive elements.
Worth Mention
What Are You Doing With Your Life? The Tail End
Kurzgesagt made a video based on WaitButWhy ‘s The Tail End (PS: I have a translation for this article). Jump out of the ocean of life and examine people’s life from a higher dimension. Combined with the background of the new crown epidemic, “an ordinary farewell has become the last time”, “the opportunities for friends and family members who can often meet have become less and less”, and the probability of such a thing happening is getting higher and higher. What you want to do after retirement may never be done again, because the most important thing at that time may have become “maintenance”.
The video does not give a solution or a way to deal with it, but points out that life is very short, accidents can happen at any time, and the older you are, the higher the probability of accidents happening (the analogy of throwing dice is very vivid, the older you are, the more likely you are to throw dice. The more, the higher the chance of getting a bad die), which I think is fine.
Why Beautiful Things Make us Happy – Beauty Explained
It is also a video made by Kurzgesagt, explaining why “beautiful things make us happy”. Although everyone has different preferences for beauty, there is still a consensus on the basic structure of beauty such as the golden section, fractal, and symmetry. Back in ancient times, people or things with these traits usually meant producing healthy offspring, or keeping themselves healthy. Entering modern society, if the things around us (such as the city or neighborhood in which we live) make us feel good, it also promotes health, behavioral patterns, cognitive ability and mood, and enhances well-being.
How to have it all: Buffett’s inspiration
In the same NewsLetter, which talked about Buffett’s revelation, she said: When we talk about Warren Buffett, we always focus on how he invests, and we talk less about Buffett’s “how to live a good life”. This is buried treasure.
The core point of the article is to engage in more positive-sum games and achieve both. Buffett spent some time in his youth as a stockbroker, earning a commission on sales, and his desire to maintain integrity thus conflicted with his interests. For example, he is bullish on the long-term value of GEICO stock, recommends it to friends and family, and tells them it’s best to hold it for 20 years. But that means there is only one sale, and he can’t get more commissions from it. At 68, he summed it up in his speech:
A stockbroker is like a doctor, the more times he makes you change your medicine, the more he makes.
If he gives you a medicine to cure your disease, he can only make one transaction, one transaction, and then it will be gone.
If he can convince you that changing medicines every day is good for your health, it’s good for him, and it’s good for the seller, you’re going to lose a lot of money. If your health is not good, you will also lose money.
The job turned him off. If he wants to make more money, he has to become a “black-hearted doctor”; if he adheres to moral principles, he cannot achieve his desire to “be rich” through work.
When you can’t have both, Buffett decided to change the game. He wants to be on the client’s side and manage the wealth for the client, not sell them stock, so that his interests are aligned with the client’s.
In fact, the relationship between employees and the company should also be a positive-sum game. The employees can improve their abilities through project experience, and the company can provide better services to customers through these projects.
The “non-zero-sum game” mentioned in the article is also worth looking at.
iPhone 14 Pro Camera Review: A Small Step, A Huge Leap
The in-depth analysis of the iPhone 14 camera brought by the Halide team compared it with the previous generation from different dimensions such as image quality, wide angle, macro, blur, low light, etc. The conclusion is: A Huge Leap (a huge leap). For example, this one is the result of the author putting the camera on a rock for 30 seconds, which is amazing.
How to Remember Vocabulary
English vocabulary is very important. If you have enough vocabulary, reading English content will not be too difficult. The teacher summed up some of her tips for memorizing words, which should also work well for memorizing other content.
Draw Picture, this is how she uses this technique. She “packages” the word to be remembered in her own painting. For example, “donkey” includes the word in her drawing of a donkey. It doesn’t matter if it’s weird, but instead will be more impressive.
launched a new project and made $10,000 in the first day.
The famous Indie Hacker Pieter Levels has launched an AI-based avatar beautification website . After users upload a few avatars, AI will automatically beautify them and generate new avatars with different effects. On the first day of launch, $10,000 was credited, and the technology behind it is DreamBooth .
How far are ordinary people from “banal evil”
- It is difficult not to do evil, not because of the temptation to do evil, but in determining one’s correct position, which is far more difficult than everyone thinks. Facing a large-scale society, good and evil are not directly influenced by the face-to-face between individuals, but become an institutionalized and systematically derived issue.
- Ordinary people who do nothing will fall into evil mediocrity because they fall into unverifiable notions of right and wrong; ordinary people who stay out of the way will have to face evil mediocrity because the system is aggressive to life; and ordinary people who can’t take care of themselves , not only this belief may be a trap for self-imposed limitations, but also puts oneself in a position that is one step away from the mediocrity of evil because of self-preservation.
- We can almost accept the “banality of evil” as a kind of original sin that we have to face, and let our understanding of this original sin become the driving force for us to truly face life seriously.
This article is reproduced from: https://limboy.me/links/2022-44/
This site is for inclusion only, and the copyright belongs to the original author.