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
Mongo DBとS式検索
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Niyarin
August 29, 2020
Programming
360
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Mongo DBとS式検索
Niyarin
August 29, 2020
More Decks by Niyarin
See All by Niyarin
Scheme用nREPLの開発(エラー出力の改善)
niyarin
0
190
bel lispの紹介
niyarin
0
800
nanopass-compiler-frameworkを使ってみました
niyarin
0
500
Gorgos-parser-combinator-written-in-scheme
niyarin
0
430
outputting-beautiful-s-expression
niyarin
0
430
Serialisp
niyarin
1
740
goodbye-python-repl
niyarin
0
400
SchemeのEphemeronとWeak Pairの説明
niyarin
0
1.1k
red-paren-scheme-rev-macro.pdf
niyarin
0
460
Other Decks in Programming
See All in Programming
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
270
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.3k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
150
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
290
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
410
Verilogで学ぶCPU自作入門.pdf
uyuki234
7
3.9k
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
210
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
iOSDC2026登壇資料.pdf
riofujimon
0
200
APNsからLive Activityを開始する話
yumnumm
0
120
iOSDCのペンライトを自動制御したい!
akkeylab
0
340
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
32
14k
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Embracing the Ebb and Flow
colly
88
5.2k
Agile that works and the tools we love
rasmusluckow
331
22k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Become a Pro
speakerdeck
PRO
31
6.3k
How to Ace a Technical Interview
jacobian
280
24k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
sira's awesome portfolio website redesign presentation
elsirapls
0
430
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
Transcript
S式ソースコード検索と Mongo DB (やってみたけどそんなに良くなかった) Niyarin Clojure
モチベーション 例) 「Clojureのmapの引数が1つのコード例がみたい」 → 雑に”map”でコード片を検索すると目当てでないものも引っかかる ・正規表現で検索 ・構造で検索 → S式言語ならできる
Gists的なものを作る ・Gists的なソースコード片を投げるようなWebアプリ 大学でDB使ったWebアプリ書けって課題がでたので作った 真面目には作っていない ・Clojureの式を登録して、ちょっと便利に検索できるようにする ・Clojureで実装 Selmer(テンプレート) Duct(フレームワーク) 余り活用していない Ataraxy(ルーティング)
構造とDB リストとかを突っ込んでそれの構造を検索したい ・Mongo DB(JSONが直に使えるNOSQL) Clojureとかにもドライバが提供されている Monger RDBでもできなくはないけど
MongoDBの例 リストの最初の要素がargnameのものをとってくる リストの長さがarglenのものをとってくる JavaScriptをクエリに使うこともできる ※”,”がないのはClojureから呼び出しているから {“$elemMatch” {“ls.0” argname}} {“$elemMatch” {”ls”
{“$size” arglen)}}
あまり楽にできなかった部分 ・部分的な木構造の検索ができない 決められた深さのオブジェクトに対してしか検索できない ・リストを全部取り出して、内部リストを”object”等の文字列に変更 (+ (* 1 2) (* 3
4)) [(+ “object” “object”) (* 1 2) (* 3 4)]
生前の姿 (クラウドは落とされていた) (ローカルで立ち上げてもよかったけど)
もう少しがんばってもよかった点 検索がもっといろいろできたのではないか ・S式パターンマッチでの検索 ・なにか フロントエンド
今回どういうDBがあればよかったのか ・EDN登録できるドキュメント型NO SQL ・クエリ言語をClojure風なやつにする クエリ言語そのものもDBに入れられる クエリ言語をクエリ言語で操作できる ・パターンマッチ ・部分的な木構造を検索できる
おわり まとめ ・S式系言語用の検索に特化したGists的なのを考えた ・Clojureで雑に実装した その他 ・非S式言語でもASTに落とせばなんかできるかも ・EDN DBはいつかつくりたい