Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
alexpovel
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
alexpovel
2y ago
Oh yeah, that looks super similar. I remember the similarity score being tricky to get useful signal out of, for the underlying model I had used back then. Similar and dissimilar issues all hovered around the 0.80 mark. But surely not hard
2.
▲
by
alexpovel
2y ago
Agree! For fun, I had put together a GitHub bot for this purpose a while ago. It indexes all existing issues in a repo, creates embeddings and stores them in a vector DB. When a new issue is created, the bot comments with the 3 most similar
3.
▲
by
alexpovel
2y ago
Not the OP, but you raise good points. Performance might also be a concern, thinking of languages like Python and its ast package (not sure that’s accessible without going through the interpreter). For a tool I’m writing, the tree-sitter qu
4.
▲
by
alexpovel
2y ago
These sorts of cases are why I wrote srgn [0]. It's based on tree-sitter too. Calling it as cat file.py | srgn --py def --py identifiers 'database' 'db' will replace all mentions of `database` inside ide
5.
▲
by
alexpovel
2y ago
Regarding your third point, I put together a tool capable of that to some degree. It allows you to grep inside source code, but limit the search to e.g. “only docstrings inside class definitions”, among other things. That is, it allows nest
6.
▲
by
alexpovel
2y ago
The tool you are describing is what I am trying to build at https://github.com/alexpovel/srgn . The idea is a compromise between regex (think ripgrep) and grammar awareness (through tree-sitter).
7.
▲
Show HN: Srgn, AST-aware text manipulation
(github.com)
2 points
by
alexpovel
3y ago
|
1 comments
8.
▲
by
alexpovel
3y ago
> But this is a custom setup that's not portable? Caught me. > And how is it less tedious to have to select previously typed text all the time? This is tedious, but I have that automated (AutoHotKey). So a single, AHK-managed hot
9.
▲
by
alexpovel
3y ago
It's currently whitelist-based [0]. The downside is larger (code) size. The upside is simplicity. I imagine a blacklist could also work well, at smaller size but with more preprocessing needed. [0]: https://github.com/a
10.
▲
by
alexpovel
3y ago
https://github.com/alexpovel/srgn It grew out of a niche, almost historical need: using a QWERTY keyboard, but needing access to German Umlauts (ä, ö, ü, as well as ß). Switching keyboard layouts is possible but exhaus
11.
▲
by
alexpovel
3y ago
> diff formatting Thank you for the feedback! That sounds good, I'll add that.
12.
▲
by
alexpovel
3y ago
Exactly, all the parsing is done by tree-sitter. The Rust bindings to the tree-sitter C lib are a "first-class consumer".
13.
▲
by
alexpovel
3y ago
Wow! What a coincidence. Just the other day I finished "v1" of a similar tool: https://github.com/alexpovel/srgn , calling it a combination of tr/sed, ripgrep and tree-sitter. It's more about editin
14.
▲
by
alexpovel
4y ago
ancv: https://github.com/alexpovel/ancv/ Idea: renders your resume as pretty terminal output. Others can view it in their own terminals: curl -L ancv.io/heyho Pipe to a pager for best viewing. Yes, i
15.
▲
Show HN: ancv - Share your CV through curl, pretty-printed
(github.com)
2 points
by
alexpovel
4y ago
|
0 comments
16.
▲
Show HN: Ancv – Renders your resume/CV for online and pretty terminal display
(github.com)
3 points
by
alexpovel
4y ago
|
0 comments
17.
▲
by
alexpovel
5y ago
> Neat! I'm using QWERTY International layouts myself, where you can type umlauts and ß with special keys for modifiers (e.g. alt+u on Mac for ¨), but I still think this is a cool tool. Yeah, I had looked into these but for some re
18.
▲
by
alexpovel
5y ago
A couple years ago, I switched from German QWERTZ to a UK QWERTY keyboard (wouldn't have minded US QWERTY but the differently shaped return key seemed too foreign). I am not looking back: for programming but also general tasks, having
19.
▲
by
alexpovel
6y ago
> basically every scientific paper I read is set using pdftex That is only because their templates are years behind the curve and they are slow to update. It is not an argument for the advantages of pdftex, aside from its stability, gain
20.
▲
by
alexpovel
6y ago
LuaLaTeX allocates memory as-needed, see section 3.4.1 in the manual [0] (and comments/answers in this thread [1]). Base TeX has an arbitrary, by modern standards low memory limit, leading to a whole class of errors plaguing unsuspecti
21.
▲
by
alexpovel
6y ago
This looks amazing and like everything I always wanted. Sadly, I think basing off XeTeX and not LuaTeX is a mistake. Certainly renders it unusable for me. Having Lua integration is just great. Also, `lualatex` does not have some of the li