Skip to content

Instantly share code, notes, and snippets.

View yanana's full-sized avatar
🦄
✨🦐✨

5hun Yanaura yanana

🦄
✨🦐✨
View GitHub Profile
@debasishg
debasishg / dod.md
Last active January 12, 2026 16:07
Data oriented design, hardware awareness, cache awareness in data structures & algorithms

Performance Engineering, Hardware and cache awareness with algorithm and data structures

  1. Parallel Computing Course - Stanford CS149, Fall 2023
  2. Performance-Aware Programming Series by Casey Muratori
  3. Algorithms for Modern Hardware
  4. Computer Systems: A Programmer's Perspective, 3/E - by Randal E. Bryant and David R. O'Hallaron, Carnegie Mellon University
  5. Performance Engineering Of Software Systems - am MITOCW course
  6. Parallel Programming 2020 by NHR@FAU
  7. Cpu Caches and Why You Care - by Scott Meyers
  8. [Optimizing a ring buffer for throughput](https://rig
@debasishg
debasishg / trait_bound.md
Last active January 23, 2024 05:51
Rust Idiom (Trait Bounds)

Trait Bounds

Trait bounds in Rust are really powerful and also offers lots of idiomatic ways to constrain your model. Bounds are for enforcing constraints even in other languages like Scala, but Rust offers them at a different level.

Here's one example from the book Rust for Rustaceans (a great book BTW).

Suppose you want to construct a HashMap<K, V, S>, whose keys are some generic type T, value is a usize, you can write bounds like T: Hash + Eq, S: BuildHasher + Default.

pub fn doit<T>(value: T)
@pickoba
pickoba / satysfi-page-break.md
Last active October 22, 2023 18:26
SATySFi のページ分割一般化と多段組

SATySFi のページ分割一般化と多段組

この記事は SATySFi Advent Calendar 21 日目の記事です。

もともと個人的なメモとしてまとめていた、SATySFi のページ分割に関するアイデアを公開します。あくまでも一ユーザの意見なのでツメが甘いところが多々あるかと思いますが、その際はご指摘いただけると幸いです。また、具象構文は SATySFi 0.1.0 のものを採用しています。

想定読者

SATySFi を使ったことがあり、block-boxes 等の概念を理解している人

use std::time::Duration;
pub use OpF::*;
// Simple operation, with open recursion
#[derive(Debug, Clone)]
pub enum OpF<R> {
Once(String, Duration),
Par(Vec<R>),
Seq(Vec<R>),
Repeat { times: u32, cmd: Box<R> },
@apstndb
apstndb / 0service-to-service-auth.md
Last active June 17, 2019 04:37
Cloud Run service-to-service auth example

setting

$ gcloud iam service-accounts create callee
$ gcloud iam service-accounts create caller
$ gcloud builds submit -t gcr.io/${PROJECT_ID}/oidctest .
$ gcloud beta run deploy --image=gcr.io/${PROJECT_ID}/oidctest --allow-unauthenticated \
    --service-account=caller@${PROJECT_ID}.iam.gserviceaccount.com caller 
$ gcloud beta run deploy --image=gcr.io/${PROJECT_ID}/oidctest --no-allow-unauthenticated \
    --service-account=callee@{PROJECT_ID}.iam.gserviceaccount.com callee
@qnighy
qnighy / rust-patterns.md
Last active March 6, 2025 19:03
Rustのパターンっぽいやつメモ

パターンとはその言語が抽象化できなかった敗北の歴史である。 しかしどんなに優れた言語であってもあらゆる繰り返しに勝てるわけではない。 人は必ずメタ繰り返しを欲するからだ。 そしてそれはRustも例外ではない。

ここでは、OOPでも知られているパターンよりも、Rustに特有のパターンを思いつく限りまとめてみた。名前は適当。

  • crate splitting
    • でかいcrateを分割して、見通しを良くする・再コンパイルの分量を削減する・並列コンパイルを可能にする
  • 親玉crate(全てにdependする)と殿crate(全てにdependされる)があることが多いので、だいたい束みたいな形になる。
@mala
mala / autofill_ui.md
Last active January 19, 2017 07:02
暮らしに役立つITコラム ChromeやSafariの自動入力機能が、なぜ「悪いデザイン」なのか

見た目の上で、隠されているフィールドに対しても自動入力してしまうという問題が話題になっている(2017年1月)

のだけれど、この問題の歴史はとても古い。自分も調査したり問題を報告したりしているので、振り返ってみる。

2012年の話

2012年4月のShibuya.XSS #1 https://atnd.org/events/25689 で、Hamachiya2が発表した

@codefromthecrypt
codefromthecrypt / opentracing-zipkin.md
Last active October 27, 2021 01:44
My ramble on OpenTracing (with a side of Zipkin)

I've had many people ask me questions about OpenTracing, often in relation to OpenZipkin. I've seen assertions about how it is vendor neutral and is the lock-in cure. This post is not a sanctioned, polished or otherwise muted view, rather what I personally think about what it is and is not, and what it helps and does not help with. Scroll to the very end if this is too long. Feel free to add a comment if I made any factual mistakes or you just want to add a comment.

So, what is OpenTracing?

OpenTracing is documentation and library interfaces for distributed tracing instrumentation. To be "OpenTracing" requires bundling its interfaces in your work, so that others can use it to time distributed operations with the same library.

So, who is it for?

OpenTracing interfaces are targeted to authors of instrumentation libraries, and those who want to collaborate with traces created by them. Ex something started a trace somewhere and I add a notable event to that trace. Structure logging was recently added to O

@sile
sile / 0_succ_bp.md
Last active April 23, 2025 03:15
簡潔データ構造やBalancedParenthesesの紹介資料メモ

発表資料メモ: 簡潔データ構造について

  1. 主題

  • 数千万オーダーの文字列集合(およびマップ)を如何にサイズ効率良く表現するか、の話
    • 諸事情で集合をメモリ上に保持したいことがあるが、サイズは節約したい
    • 実際にはサイズのみを追求するのではなく、諸々のトレードオフを加味しつつバランスを取る
  • 今回はそれを実現するための方法の一つである 簡潔データ構造 について説明する: