Парочка #mechanics #video, рассматривающих, как устроен механизм авторучки.
How a Retractable Ballpoint Pen Works
How Does a Clicky Pen Work?
Скажу честно, я удивлён, что эта задача решается всего четырьмя деталями и парой пружин.
How a Retractable Ballpoint Pen Works
How Does a Clicky Pen Work?
Скажу честно, я удивлён, что эта задача решается всего четырьмя деталями и парой пружин.
YouTube
How a Retractable Ballpoint Pen Works
A ballpoint pen seems simple: press a button you can write, press again and put it in your pocket. Yet inside a clever mechanisms turns that simple push into all sorts of other motions. This video uses detailed animation to look inside the iconic Parker Jotter…
👍1👎1
#prog #rust #article
How we built Pingora, the proxy that connects Cloudflare to the Internet
Today we are excited to talk about Pingora, a new HTTP proxy we’ve built in-house using Rust that serves over 1 trillion requests a day, boosts our performance, and enables many new features for Cloudflare customers, all while requiring only a third of the CPU and memory resources of our previous proxy infrastructure.
<...>
We chose Rust as the language of the project because it can do what C can do in a memory safe way without compromising performance.
<...>
Overall traffic on Pingora shows 5ms reduction on median TTFB and 80ms reduction on the 95th percentile. This is not because we run code faster. Even our old service could handle requests in the sub-millisecond range.
The savings come from our new architecture which can share connections across all threads. This means a better connection reuse ratio, which spends less time on TCP and TLS handshakes. [В этом плане лучше Nginx, в архитектурные ограничения упёрлись в CloudFlare: у того пул соединений отдельный у каждого рабочего процесса]
Across all customers, Pingora makes only a third as many new connections per second compared to the old service. For one major customer, it increased the connection reuse ratio from 87.1% to 99.92%, which reduced new connections to their origins by 160x. To present the number more intuitively, by switching to Pingora, we save our customers and users 434 years of handshake time every day.
<...>
When crashes do occur an engineer needs to spend time to diagnose how it happened and what caused it. Since Pingora's inception we’ve served a few hundred trillion requests and have yet to crash due to our service code.
In fact, Pingora crashes are so rare we usually find unrelated issues when we do encounter one. Recently we discovered a kernel bug soon after our service started crashing. We've also discovered hardware issues on a few machines, in the past ruling out rare memory bugs caused by our software even after significant debugging was nearly impossible.
How we built Pingora, the proxy that connects Cloudflare to the Internet
Today we are excited to talk about Pingora, a new HTTP proxy we’ve built in-house using Rust that serves over 1 trillion requests a day, boosts our performance, and enables many new features for Cloudflare customers, all while requiring only a third of the CPU and memory resources of our previous proxy infrastructure.
<...>
We chose Rust as the language of the project because it can do what C can do in a memory safe way without compromising performance.
<...>
Overall traffic on Pingora shows 5ms reduction on median TTFB and 80ms reduction on the 95th percentile. This is not because we run code faster. Even our old service could handle requests in the sub-millisecond range.
The savings come from our new architecture which can share connections across all threads. This means a better connection reuse ratio, which spends less time on TCP and TLS handshakes. [В этом плане лучше Nginx, в архитектурные ограничения упёрлись в CloudFlare: у того пул соединений отдельный у каждого рабочего процесса]
Across all customers, Pingora makes only a third as many new connections per second compared to the old service. For one major customer, it increased the connection reuse ratio from 87.1% to 99.92%, which reduced new connections to their origins by 160x. To present the number more intuitively, by switching to Pingora, we save our customers and users 434 years of handshake time every day.
<...>
When crashes do occur an engineer needs to spend time to diagnose how it happened and what caused it. Since Pingora's inception we’ve served a few hundred trillion requests and have yet to crash due to our service code.
In fact, Pingora crashes are so rare we usually find unrelated issues when we do encounter one. Recently we discovered a kernel bug soon after our service started crashing. We've also discovered hardware issues on a few machines, in the past ruling out rare memory bugs caused by our software even after significant debugging was nearly impossible.
🔥14👍1👎1🖕1
Forwarded from dd if=/dev/stuff of=/dev/tg
Еще немного тайплевельного программирования — крестики-нолики на типах TypeScript:
https://note89.github.io/typescript-typelevel-tic-tac-toe/
https://note89.github.io/typescript-typelevel-tic-tac-toe/
note89.github.io
TypeScript Typelevel Tic-Tac-Toe: Overkill edition!
A fully functioning, dynamically sized, Tic Tac Toe Game with a UI, all on the typelevel. The TypeScript typesystem is very powerful!
🐳7🍾4👎1🔥1🏆1🍓1
Forwarded from Кустарный мыслепоток (Konstantin Redkin)
🤬4😢2❤1👎1
Linker Unsafe
Душераздирательная история о том, как человек разочаровался в индустриальном программировании, но потом нашёл Rust, изучил, сменил работу и вновь обрёл веру в человечество. https://reddit.com/r/rust/comments/khlln4/how_rust_changed_and_saved_my_life
Medium
An almost religious case for Rust
The Rust community is known to be very passionate about Rust, and some even blame us for occasionally behaving like a cult. I’m afraid I…
👎2👍1
Блог*
#prog #rust Смержили github.com/rust-lang/rust/pull/96709 🎉🎉🎉🎉🎉🎉🎉🎉
GitHub
Stabilize `let else` by est31 · Pull Request #93628 · rust-lang/rust
🎉 Stabilizes the let else feature, added by RFC 3137. 🎉
Reference PR: rust-lang/reference#1156
closes #87335 (let else tracking issue)
FCP: #93628 (comment)
Stabilization report
Summary
The featu...
Reference PR: rust-lang/reference#1156
closes #87335 (let else tracking issue)
FCP: #93628 (comment)
Stabilization report
Summary
The featu...
🎉12👎2