[{"data":1,"prerenderedAt":202},["ShallowReactive",2],{"project-27248960":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":34,"aspects":35,"strip":38,"post_text":40,"what":41,"said":79,"maker_in_thread":132,"shape":142,"grid":146,"attempts":163,"same_week":164,"maker_shows":31,"maker_hidden":194,"reader_version":195,"card":196},"27248960","ClangQL","Query C++ codebases using SQLite","title","Show HN: ClangQL – Query C++ codebases using SQLite","https:\u002F\u002Fgithub.com\u002Ffrabert\u002FClangQL","github.com","frabert",1621707322,2021,73,11,678,2533,27,"notable","dev_tools","code querying","cli",[24,25,26,27],"c++ code query","sqlite","clangd","code indexing","mixed",0.125,{"positive":31,"neutral":31,"mixed":32,"critical":33},2,0,1,5,{"performance":36,"idea":37},{"positive":32,"critical":33},{"positive":31,"critical":32},[32,32,33,32,32,32,34,39,32,39,34],3,null,{"problem":42,"audience":40,"pricing":40,"motivation":50,"time_to_build":40,"stack":57,"openness":77,"stage":78,"team_size":78},{"value":43,"source":44,"evidence":45},"Querying C++ codebases like a database","commenter",[46],{"id":47,"by":48,"text":49},"27255486","gaze","I tried doing this using prolog last summer to extract some features from a codebase. I loved it. Being able to query a codebase like a database is extremely useful.",{"value":51,"source":52,"evidence":53},"Maker wanted a SourceTrail-like graph of the LLVM codebase, which kept failing, so they used clangd's index instead.","maker",[54],{"id":55,"by":11,"text":56},"27249245","The idea for doing this experiment was actually that I tried times and times again to produce a SourceTrail graph for the LLVM codebase but always failed due to one reason or…",[58,64,68,73],{"value":59,"source":60,"evidence":61},"C++","inferred",[62],{"id":63},"post",{"value":65,"source":52,"evidence":66},"SQLite",[67],{"id":63},{"value":26,"source":52,"evidence":69},[70],{"id":71,"by":11,"text":72},"27253580","I wired it to clangd specifically because of two main reasons: - LLVM provides a remote interface to their index accessible through a gRPC connection - The clangd protocol is…",{"value":74,"source":52,"evidence":75},"gRPC",[76],{"id":71,"by":11,"text":72},"open_source","unknown",{"praise":80,"objections":92,"requests":103,"questions":115,"alternatives":120},[81,85],{"value":82,"source":44,"evidence":83},"Querying codebases like a database is useful",[84],{"id":47,"by":48,"text":49},{"value":86,"source":44,"evidence":87},"Cool idea using SQLite",[88],{"id":89,"by":90,"text":91},"27252593","laymonage","This is cool! You can do a lot of things with SQLite these days.",[93],{"value":94,"source":44,"evidence":95},"SQLite virtual tables perform poorly with joins",[96,100],{"id":97,"by":98,"text":99},"27250292","thechao","Man. I love SQLite, but the current virtual table extension is a performance dumpster fire. SQLite doesn’t understand multiple-column indexes on virtual tables, and the secret…",{"id":101,"by":98,"text":102},"27255174","I don't know if you're serious, but the `xBestIndex` function is supposed to be a literal description of the size & efficiency of the various tables. Lets say you have four…",[104],{"value":105,"source":44,"evidence":106},"Support for C code and other languages",[107,111],{"id":108,"by":109,"text":110},"27249220","cryptonector","Cscope as a SQL DB? I would really like that. But it's important not to stop at parsed code, especially in C (for obvious reasons).",{"id":112,"by":113,"text":114},"27253553","marco_craveiro","Pretty cool! One question though: if this was based on LSP in general, it could be generalised to any language, right? I wonder why they wired it to clangd specifically.",[116],{"value":117,"source":44,"evidence":118},"Why clangd specifically rather than LSP generally",[119],{"id":112,"by":113,"text":114},[121,128],{"value":122,"source":44,"evidence":123},"SourceTrail",[124],{"id":125,"by":126,"text":127},"27249231","pkhuong","For something less PoCy, https:\u002F\u002Fwww.sourcetrail.com\u002F 's internal representation of the reference graph is a sqlite db file with pretty much a triple store schema.",{"value":129,"source":44,"evidence":130},"Cscope",[131],{"id":108,"by":109,"text":110},{"comments":133,"answered":33,"key":134},4,[135,136,139],{"id":55,"text":56},{"id":137,"text":138},"27250364","I'd be very interested in this SQLite Necronomicon you're talking about :)",{"id":140,"text":141},"27257524","Thanks, I was serious and any insight from anyone who has more experience than me in this stuff is appreciated!",{"commenters":143,"max_depth":133,"maker_replies":133,"first_comment_mins":144,"lifespan_hours":145},7,34,25,[147,149,151,153,155,156,157,159,160,161,162],[125,32,32,148,126,32],"other\u002Fneutral\u002Fnone",[55,32,32,150,11,33],"project\u002Fneutral\u002Fidea",[97,33,33,152,98,32],"project\u002Fcritical\u002Fperformance",[137,33,32,154,11,33],"commenter\u002Fneutral\u002Fnone",[101,33,32,154,98,32],[140,33,32,154,11,33],[47,31,34,158,48,32],"project\u002Fpositive\u002Fidea",[112,39,39,150,113,32],[71,39,32,150,11,33],[108,133,39,150,109,32],[89,34,34,158,90,32],[],[165,170,175,179,184,189],{"id":166,"name":167,"points":168,"category":169},"27254177","SNKRX",496,"games",{"id":171,"name":172,"points":173,"category":174},"27249082","Inflation-adjusted Hacker News",437,"consumer_social",{"id":176,"name":177,"points":178,"category":174},"27293902","findareddit.com",406,{"id":180,"name":181,"points":182,"category":183},"27224094","pintr",405,"creative",{"id":185,"name":186,"points":187,"category":188},"27264500","CloudBite",365,"learning_science",{"id":190,"name":191,"points":192,"category":193},"27219646","Nyxt Browser 2.0.0",359,"productivity",false,"v2",{"id":197,"name":5,"line":6,"ai":194,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":198,"top":18,"kw":199,"maker":11,"domain":10,"tier":19,"attempts":32,"strip":200,"url":9,"mix":201,"praise":82,"objection":94,"sub":21},27248960,0.13,[24,25,26,27],"00100053035",[31,31,32,33],1794036607023]