Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
R.*u.*f.*f.*
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
taxfree
September 21, 2024
19
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
Evolving collaborative research ideas with multi-agent grounding in lab-specific contexts and literature
taxfree_python
0
13
研究開発のための Coding Agent 活用術
taxfree_python
0
85
R&D_UIのラストワンマイルをLLMで埋める
taxfree_python
0
19
AI for タギロン
taxfree_python
0
41
traP 2024 忘年会
taxfree_python
0
11
traP ユニークビジョン LT 会
taxfree_python
0
18
traP_新入生オリエンテーション_2024
taxfree_python
0
110
A Beginner's Guide to Quantum computing
taxfree_python
0
420
How to create slack Bot with Python?
taxfree_python
1
350
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
21k
Evolving SEO for Evolving Search Engines
ryanjones
0
210
Paper Plane
katiecoart
PRO
1
51k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
140
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
830
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
570
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
22k
A Soul's Torment
seathinner
6
2.9k
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