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
Blueskyのプラグインを作ってみた
Search
Hakkadaikon
May 31, 2025
Programming
870
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Blueskyのプラグインを作ってみた
ゴリラ.vim #36 ~ Vim x SNS ~ で登壇した内容
https://gorillavim.connpass.com/event/353161/
Hakkadaikon
May 31, 2025
More Decks by Hakkadaikon
See All by Hakkadaikon
MoQTフルスクラッチ実装
hakkadaikon
1
60
Just do it ! で 走り抜けてきたけど ちょっと立ち止まってみた
hakkadaikon
0
910
自作WebSocket (RFC6455)
hakkadaikon
0
150
routstrについて
hakkadaikon
0
170
Nostr x BTC
hakkadaikon
0
76
PHP x Nostr
hakkadaikon
0
190
Emacs x Nostr
hakkadaikon
2
430
My Introduction To Nostr
hakkadaikon
0
270
Nostr × C#
hakkadaikon
0
270
Other Decks in Programming
See All in Programming
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
780
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
640
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
180
Deep dive into the select statement (GopherCon UK)
jespino
0
160
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
360
이 함수, 실패하면 어떻게 되나요? null부터 Rich Errors까지, Kotlin 에러 처리 15년
haeti2
0
110
ソフトウェアラスタライザ
fadis
1
760
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
Flow は今どうなっているか
mizdra
PRO
0
820
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
250
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
180
How I Won Prize Money at a Hackathon Using Codex and Symphony Alpha
yasei_no_otoko
0
130
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
How STYLIGHT went responsive
nonsquared
100
6.3k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
180
Writing Fast Ruby
sferik
630
63k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
440
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
960
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Typedesign – Prime Four
hannesfritz
42
3.2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Transcript
Blueskyの Vimプラグインを つくってみた ゴリラ.vim #36 発火大根
と…その前に
開催決定おめでとう ぼくもちょっとスポンサーしました
自己 紹介
名前 : 発火大根 Bluesky歴 : 2年ちょい(2023/5/1開始) 本業 : SRE (転職してちょうど3ヶ
月目) 趣味 - SNSで穀潰し (主にNostr/vim-jp/…) - 卓球 (月1) - 誘われて謎解きをやったりとか
色んなとこでLTやったりオフ会やったり お世話になったりしてます
2024.09.23 Nostrasia 2024 - 海外の方に登壇いただいたり - マグロ解体ショーやったり - 配信されてるのでみてね
Blueskyでやった 私の活動紹介
2023/9/2 NGワードチェックつき 投稿専用クライアント
2024/2/21 Vim script + Indigo Blueskyクライアント PoC
最近つくったやつ
WebSocket プロトコルスタック - C言語製 - libc不使用 (Linuxの場合)
さて
目次 1.以前作ったBlueskyプラグインPoCの問題 2.今回作ったプラグイン
2024/02/21 Bluesky勉強会で こんな話をしました
VimからSNSがやれたら、 なんだかよさそうだぞ。 Vimは思考の速度で編集できる 開発<->SNSのシームレスな移行が可能 検索やスクラップがやりやすくなる!
しかし この時作ったPoCは 問題を抱えていた
①Neovim依存
NeovimのVim scriptで 書いてる →拡張性に難あり
②ツール依存
CLIツール Indigoに 依存 https://github.com/bluesky-social/indigo
もうちょっと なんかないものか…
目次 1.以前作ったBlueskyプラグインPoCの問題 2.今回作ったプラグイン
Vimmer大好き denops https://github.com/vim-denops/denops.vim - denoでぃの(での)でプラグインかける - 速い - Vim/Neovim共通のプラグインが書ける -
Vimmerの間では、オリンピックより denopsのリリースが話題になっていた ことも
Firehose API - ATProtocolの仕様のひとつ - WebSocket経由でイベントがとれる - いろんなエンドポイントがある - app.bsky.feed.post
- app.bsky.feed.repost - app.bsky.feed.like – etc…
Firehose API - Firesky - John Spurlockさん作成 - Firehose APIで出来ている
- めっちゃ速く投稿流れてく - GIGAZINEでニュースにも - ちょっとみてみよう https://firesky.tv/
Denops + Firehose
wss://bsky.network/xrpc/com.atproto.sync.subscribeRepos WebSocketサーバーが用意されてる なら、denops依存だけで つくれるのでは!? (denoは標準でWebSocketがつかえる)
websocatコマンドで ためしにsubscribe してみよう
なにこれ
RFC8949: Concise Binary Object Representation (CBOR)で エンコードされている
atproto/api Blueskyの公式リファレンス実装 を使うことにした https://github.com/bluesky-social/atproto
それなりには動いた…が
2025/5/31 便利なものをみつける
Jetstream
Jetstreamの特徴 - ATProtoのイベントを シンプルなJSON形式で配信 - CBORがデコード不要
こっちのが便利じゃん! 依存も減らせる!
こっちに乗り換えよう! (発表当日だけど)
乗り換えた&動いた!
- denopsはいいぞ - ATProtocolはいいぞ - jetstreamはいいぞ まとめ
Demo (でも)
function! s:start() abort command! BskyStart call denops#request('denops-bsky', 'start', []) endfunction
function! s:stop() abort command! BskyStop call denops#request('denops-bsky', 'stop', []) endfunction augroup denops_bsky autocmd! autocmd User DenopsPluginPost:denops-bsky call s:start() autocmd User DenopsPluginPost:denops-bsky call s:stop() augroup END BskyStart : subscribe開始 BskyStop: 停止
Thank you for your attention!