Skip to content

Instantly share code, notes, and snippets.

View HeroicKatora's full-sized avatar

Andreas Molzer HeroicKatora

View GitHub Profile
@HeroicKatora
HeroicKatora / blog.md
Last active February 9, 2021 20:31
Image issue priority

A hindsight of 2020

The last year was mainly one of stability. Working up to 0.23 we had fixed many outstanding stability risks and it continues to be one of the most long-serving major versions for a long term. Part of this stability work was the ability to upgrade decoder dependencies behind the scenes. This allowed you to silently benefit from the improved gif decoder as detailed above and other similar fixes across other decoders and it will also enable similar updates for png soon.

@HeroicKatora
HeroicKatora / llvm-struct-access-optimization.rs
Created July 15, 2019 10:05
Showcase failed compiler optimization for struct access or shift respectively.
//! Test the difference between different struct access.
//!
//! Proof that the struct access by member (which compiles to a mov to stack and back) is not
//! always slower than the shift, in a situation where the arithmetic unit is also used intensively
//! by a loop index computation. Note that the results are likely to be *highly* architecture
//! dependent.
//!
//! ## Some results
//!
//! With my cpu:
@HeroicKatora
HeroicKatora / summary.txt
Created February 22, 2019 13:36
Await syntax summary
A hopefully complete list of all proposed syntaxes:
await!(fut)
await fut
await? fut
await fut?
await(fut)
await{ fut }
fut await
fut.await
maybe with prefix `await fut` through unified macro
@HeroicKatora
HeroicKatora / 0000-Readme.md
Last active February 1, 2019 23:07
Use curl to generate dumps of HTTP/2 traffic

Custom curl

Unfortunately, curl --trace output decoded http2 which makes it pointless. Http2 over tls also doesn't produce reasonable output with strace and curl, that could otherwise be a match made in heaven. But:

You can modify curl to output the raw h2 buffer data sent and received. A patch for [curl-7_63_0] will be placed in this folder, to dump that data into a temp file as nice as possible. The patch file is the other file in this gist. Don't forget to configure curl with support for nghttp2 (when building with