Skip to content

Instantly share code, notes, and snippets.

View tnishinaga's full-sized avatar

Toshifumi NISHINAGA tnishinaga

  • Japan
  • 07:43 (UTC +09:00)
View GitHub Profile
!gigabit_switch_version_1.00
!
calendar set 12 52 44 january 1 1970
!
sntp server 220.130.158.54
!
sntp zone japan
!
!
!
@qnighy
qnighy / rust-patterns.md
Last active March 20, 2024 03:33
Rustのパターンっぽいやつメモ

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

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

  • crate splitting
    • でかいcrateを分割して、見通しを良くする・再コンパイルの分量を削減する・並列コンパイルを可能にする
  • 親玉crate(全てにdependする)と殿crate(全てにdependされる)があることが多いので、だいたい束みたいな形になる。
#!/bin/bash
#################################################
# ieserver.net 更新スクリプト
# https://gist.github.com/int2xx9/6304105
# 必要なコマンド: bash, curl, grep, sed, expr
# 自動更新させる場合cronも必要です
#################################################
#################################################