Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
R.*u.*f.*f.*
Search
taxfree
September 21, 2024
23
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
R.*u.*f.*f.*
Ruff に「ろしでれ」要素を追加した
taxfree
September 21, 2024
More Decks by taxfree
See All by taxfree
ICML 2026 参加報告 AI for Science を中心に/icml-2026-conference-report-ai-for-science
taxfree_python
0
14
Evolving collaborative research ideas with multi-agent grounding in lab-specific contexts and literature
taxfree_python
0
25
研究開発のための Coding Agent 活用術
taxfree_python
0
93
R&D_UIのラストワンマイルをLLMで埋める
taxfree_python
0
43
AI for タギロン
taxfree_python
0
51
traP 2024 忘年会
taxfree_python
0
19
traP ユニークビジョン LT 会
taxfree_python
0
27
traP_新入生オリエンテーション_2024
taxfree_python
0
120
A Beginner's Guide to Quantum computing
taxfree_python
0
430
Featured
See All Featured
How to build a perfect <img>
jonoalderson
1
6k
Done Done
chrislema
186
17k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
990
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Deep Space Network (abreviated)
tonyrice
0
320
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Odyssey Design
rkendrick25
PRO
2
810
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
280
Faster Mobile Websites
deanohume
310
32k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
76k
Transcript
R.*u.*f.*f.* 東京工業大学 tax_free 2024/09/21 @PFN cafe
1. 自己紹介 所属: 東京工業大学 情報理工学院 数理・計算科学系 専門: 数理最適化(研究室は連続をやってる人が多い) サークル: iGEM
を 2 年やってた traP で自炊した写真を共有するなど 趣味: ご飯を食べるのと作るのが好き (回数は少ないけど)旅行するのが好き Twitter: @taxfree_python
2. Ruff とは Python の linter かつ code formatter 嬉しさ
1 嬉しさ 2 いろんなツールがまとまってる Rust で書かれているので早い Flake8 (linter) + Black (formatter) + isort (import sorting) + pydocstyle (docstring formatter) ↓ Ruff 実行時間(sec) 0 10 20 30 40 50 60 Ruff Autoflake Flake8 Pyflakes Pycodestyle Pylint 実行時間のデータは https://docs.astral.sh/ruff/ より
3. 構文解析器の仕組みを(やんわり)説明 構文解析(こうぶんかいせき、英語: parsing, syntactic analysis, syntactic analysis) は、ある言語において、その形式文法に従って記号の文字列を分析する手続きである。 構文解析を行う機構を構文解析器(parser)と呼ぶ。
(https://ja.wikipedia.org/wiki/構文解析 より引用) 構文解析とは: Python だと ast ライブラリを使うと簡単に試すことができる! サンプルコードは https://docs.python.org/ja/3/library/ast.html より引用
4. 時々ボソッとロシア語でデレる隣のアーリャさんの紹介 重要な注意: 私は読んでいません 私が知っている情報: ヒロイン?がロシア語を話すらしい ヒロイン?の声優がロシア語専攻だった ロシア語のタイトルがある Иногда́ А́ля
внеза́пно коке́тничает по-ру́сски 時々 アーリャは (主) 急に いちゃつく (現在形) coquet(英) ロシア語で
5. Ruff + 時々ボソッとロシア語でデレる隣のアーリャさん = ??? 左の Ruff のロゴは https://docs.astral.sh/ruff/
より引用 右のろしでれのロゴは https://roshidere.com/ より引用
5. Ruff + 時々ボソッとロシア語でデレる隣のアーリャさん = ??? Ruff = R(ussian) u(neven)
f(lirtatious) f(ormatter)
6. R(ussian) u(neven) f(lirtatious) f(ormatter) の機能 機能 1 機能 2
ロシア語でツンデレな?フィードバッ クをしてくれる check 中にかわいいアスキーアートが 表示される у вот, опять нужно проверять этот файл... хотя, может, он не такой уж плохой. Просто ужасно (原作)
7. 実際に動かしてみる
8. 実行速度 実行時間(sec) 0.00 0.02 0.04 0.06 0.08 0.10 Ruff(pure)
Ruff 実行時間(sec) 0.00 0.02 0.04 0.06 0.08 0.10 Ruff(pure) Ruff benchmark_data/1.py を 100 実行して 平均の実行時間を計算 benchmark_data/2.py を 100 実行して 平均の実行時間を計算
9. 今後の開発計画 terminal のサイズが小さいときでも表示できるようにする PyPI に publish する もっと多様な反応を実装したい 違反の種類ごとにメッセージを変える
E1 ← pycodestyle のインデントに関する怒られ F ← pyflakes に関する怒られ LLM を挟んでそれっぽい文をリアルタイムで生成する 違反してる部分を組み込んだメッセージが出せると嬉しいかも Rust で書けると嬉しい... lint + format だけじゃなくて,ろしでれ Копилот の誕生も近い? repository