1.93K subscribers
3.51K photos
136 videos
15 files
3.73K links
Блог со звёздочкой.

Много репостов, немножко программирования.

Небольшое прикольное комьюнити: @decltype_chat_ptr_t
Автор: @insert_reference_here
Download Telegram
#prog #rust #js #article #successstory

Статья о том, как переписали с нуля плеер asciinema на Rust (с компиляцией в WASM) и Solid.js и получили прирост производительности в 50 раз.

(thanks @theLastOfCats)

Цитаты:

"At first I planned to implement the terminal emulation part in Rust without any optimizations, just write idiomatic Rust code, then revisit the tricks from the old implementation. The initial benchmarks blew my mind though, showing that spending additional time on optimizing the emulation part is absolutely unnecessary."

"I still thought I may need to implement some form of terminal state snapshot/restore to support the “seeking” feature. This feature requires feeding the terminal emulator with the whole text stream between the current position and the desired position, or in the worst case when you’re seeking back, feeding the emulator with the whole text from the very beginning of the recording up to the desired position. Optimizing this could be done, for example, by keeping snapshot of the terminal emulator state at multiple time points, sort of like having key-frames every couple of seconds. In ClojureScript implementation this came for free, thanks to the immutable data structures. In the new JS+Rust implementation this would have required extra work, but it turned out, that’s not needed either - clicking on the progress bar in the new player, to jump to the desired time in the recording, results in instantaneous jump, even when it has to feed the emulator with megabytes of data to parse and interpret."
#prog #rust #article #successstory

Parsing logs 230x faster with Rust

As fantastic gravy on top of this whole situation, after a few days I realized that I needed to know exactly how much it would cost. With each log file taking about 23 seconds, and there being about 500 log files per day, it seemed like I would need about 350,000 seconds of Lambda execution time per month.

Then, when I went to look up Lambda pricing, I noticed that it has a free tier: 400,000 seconds per month. So in the end, it seems like I’m parsing 500GB of logs per day… for free. 😆
🤮1
#prog #successstory

Memory-safe PNG decoders now vastly outperform C PNG libraries

Не "Rust PNG decoders", потому что в список также входит wuffs
🔥4👍2
#ml и то ли #suckassstory, то ли #successstory, непонятно
😁11🫡10👍4😢2💯1
В кои-то веки #successstory
🤡1
👏29😢14