Skip to content

Instantly share code, notes, and snippets.

View sshaplygin's full-sized avatar
🎯
Focusing

Sam Shaplygin sshaplygin

🎯
Focusing
View GitHub Profile
@sshaplygin
sshaplygin / cfp.md
Last active October 27, 2026 17:54
Rust conf 2026

Rust в монорепозитории: почему -L не приведёт вас к crates.io

О чём

Монорепозиторная сборка держится на трёх свойствах: повторяемости, кешируемости и возможности распределить задачи по машинам. Все три требуют одного, чтобы входы каждой задачи были перечислены точно.

rustc принимает зависимости двумя способами:

  • через -L, то есть с указанием «поищи-ка в этом каталоге»
  • через --extern, то есть «вот имя, вот файл»
@sshaplygin
sshaplygin / example_build.sh
Created October 27, 2026 16:59
Rustcon build examples
#!/usr/bin/env bash
# Собирает примеры с ветки ya-rs стоковым rustc, повторяя схему флагов из
# build/conf/rust.conf:
#
# rustc -o $Tgt $FLAGS --edition $EDITION src/... \
# -L $RUST_STD -L ${BINDIR}/deps -L native=${BINDIR}/native \
# $_RUST_CRATE_EXTERNS
#
# Это не `ya make`: движок сборки, кеш и распределёнка тут не участвуют.
# Проверяется ровно то, про что доклад: схема имён и флагов.
@sshaplygin
sshaplygin / gist:e6725a55a55373b5c45d85cf63eec92d
Last active September 27, 2026 10:27
Заявка на RustCon 2026

Заявка на RustCon

Конференция 4 декабря 2026, Москва. Формат доклада 30–40 минут. Форма: rustcon.ru/cfp

Семь пунктов из подсказки формы (задача, обоснование, процесс, решение, применимость, для кого, польза) идут внутрь поля «Описание доклада» — отдельных полей под них нет, а просят описать подробно.


Анкета

@sshaplygin
sshaplygin / article.md
Last active August 4, 2026 02:08
Мы так и не выбрали политику кэширования. Теперь за нас это делает многорукий бандит
@sshaplygin
sshaplygin / 1.go
Last active January 31, 2026 15:12
Interview test task for Go developer
package main
import "fmt"
func main() {
fmt.Println(len("Женёк")) // ??
}
@sshaplygin
sshaplygin / Cargo.toml
Last active December 20, 2025 13:09
Thread pool with single worker channel
[package]
name = "threadpool"
version = "0.1.0"
edition = "2024"
[dependencies]
chrono = "0.4.42"
tracing = "0.1.43"
tracing-subscriber = { version = "0.3.22", features = ["fmt", "time", "chrono"] }
@sshaplygin
sshaplygin / storage.yandexcloud.net – S3.duck
Last active August 30, 2025 13:24
Yandex Cloud S3 profile for Cyberduck
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Protocol</key>
<string>s3</string>
<key>Provider</key>
<string>s3-path-style</string>
@sshaplygin
sshaplygin / main.py
Last active December 9, 2023 14:24
Adventofcode 2023 day 4
def get_text(is_test = False):
if is_test:
return [
'Card 1: 41 48 83 86 17 | 83 86 6 31 17 9 48 53',
'Card 2: 13 32 20 16 61 | 61 30 68 82 17 32 24 19',
'Card 3: 1 21 53 59 44 | 69 82 63 72 16 21 14 1',
'Card 4: 41 92 73 84 69 | 59 84 76 51 58 5 54 83',
'Card 5: 87 83 26 28 32 | 88 30 70 12 93 22 82 36',
'Card 6: 31 18 13 56 72 | 74 77 10 23 35 67 36 11',
]
@sshaplygin
sshaplygin / main.py
Last active December 9, 2023 11:54
Adventofcode 2023 day 2
def get_text(is_test = False):
if is_test:
return [
'Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green',
'Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue',
'Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red',
'Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red',
'Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green',
]
@sshaplygin
sshaplygin / main.py
Last active December 7, 2023 15:18
Adventofcode 2023 day 3
def get_text(is_test = False):
if is_test:
return [
'467..114..',
'...*......',
'..35..633.',
'......#...',
'617*......',
'.....+.58.',
'..592.....',