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
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
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
4
400
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
150
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
580
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
110
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
110
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
460
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
150
Webの地図
yosuke_furukawa
PRO
6
5k
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1k
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
250
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
330
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
22k
Crafting Experiences
bethany
1
360
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
76k
The Curse of the Amulet
leimatthew05
3
15k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
Building Applications with DynamoDB
mza
96
7.2k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
What's in a price? How to price your products and services
michaelherold
247
13k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
2k
The SEO Collaboration Effect
kristinabergwall1
1
580
So, you think you're a good person
axbom
PRO
2
2.2k
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はいつかつくりたい