Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
herrington_d
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
herrington_d
2y ago
How does it compare to teable[1], which is a postgres + airtable fusion? I can see that Google Sheet has higher availability but fewer builtin dashboards. [1] https://teable.io/
32.
▲
by
herrington_d
3y ago
Is it possible to combine n-gram and AST to dump a better indexing? Take `sourceCode.toString()` as an example, the AST can dump it to `sourceCode` and `toString`. A further indexer can break `sourceCode` to `source` and `code`. For ast dum
33.
▲
by
herrington_d
3y ago
Hi! This is Grit's release news so please allow me to only briefly answer your question. > nested syntax sg does not support it natively now and you need API to extract relevant text out. For update code, I recommend first read the
34.
▲
by
herrington_d
3y ago
Congrats from ast-grep team! Nice job Morgante! GritQL shares a lot of common ground with ast-grep, which is also a code rewriter based on tree-sitter. Interested folks may wonder about their difference. The key difference is that their sur
35.
▲
by
herrington_d
3y ago
thanks for mentioning ast-grep!
36.
▲
Find and Patch: A Novel Functional Programming Like Code Rewrite Scheme
(ast-grep.github.io)
2 points
by
herrington_d
3y ago
|
1 comments
37.
▲
by
herrington_d
3y ago
Thank for your suggestion! I will look at how to improve the README file!
38.
▲
by
herrington_d
3y ago
> changing variadic C++ macros into arithmetic expressions I don't know your exact use case but it sounds a little bit hard to me. I guess you want to change things like this. ```cpp add_macro(a, b, c, d); // before a + b
39.
▲
by
herrington_d
3y ago
Hi! Thanks for trying out ast-grep. I have been improving ast-grep's documentation since the release of the project. It is arguably not that good/abundant for resources compared to eslint/babel. But it has improved a lot (say
40.
▲
by
herrington_d
3y ago
Hi, thanks for giving ast-grep a try. Pattern code must be valid code that tree-sitter can parse.[0] You can use this syntax `try { $$$CODE } catch ($$$E) { $$$HANDLE }`[1] [0] https://ast-grep.github.io/guide/pattern-s
41.
▲
by
herrington_d
3y ago
Yes you can! https://ast-grep.github.io/playground.html#eyJtb2RlIjoiQ29uZ...
42.
▲
by
herrington_d
3y ago
I confess I stole the pip recipe from Charlie :D https://github.com/astral-sh/ruff/blob/main/.github/workflow...
43.
▲
by
herrington_d
3y ago
Of course, it gets you covered. https://ast-grep.github.io/playground.html#eyJtb2RlIjoiQ29uZ... I have the same problem also, haha, https://x.com/hd_nvim/status/1667059966111547392
44.
▲
by
herrington_d
3y ago
Provable correctness means you have to model your source and target languages. And then translate the source model to the target model. It is theoretically possible, but in practice, modeling an industry language is way too much work. Some
45.
▲
by
herrington_d
3y ago
Why I think semgrep is a security tool different from ast-grep: * Semgrep is security focused. It has many advanced static analysis features in its core product, such as dataflow analysis, symbolic propagation, and semantic equivalence, all
46.
▲
by
herrington_d
3y ago
Hi, ast-grep author here. This is a great question and I asked this in the first place before I started the hobby project. TLDR; I designed ast-grep to be on different tracks than semgrep. Semgrep is for security and ast-grep is for develop
47.
▲
by
herrington_d
3y ago
Thank ekidd for your kind words! ast-grep author here. This is a hobby project and mainly focuses on developers' daily job like search and linting. Appreciate you like it! Semgrep's vulnerability scanning is much more advanced, m
48.
▲
by
herrington_d
3y ago
treesitter gives us a uniform interface to parse and manipulate code, which is awe-inspiring work. I wish tree-sitter could have more contributors to the core library. It still has a lot of improvement space. Say, like performance. tree-sit
49.
▲
by
herrington_d
3y ago
Hey morgante, nice to meet you again! Indeed YAML is a compromise between expressiveness and easy-learning. Grit did a great job for providing advanced code manipulation!
50.
▲
by
herrington_d
3y ago
Hey paulg, ast-grep author here! This is something I also want to do in ast-grep! ast-grep prints the surrounding lines around matches but they are not aware of which function/scope the matches are in. May I ask how you do the scope d
51.
▲
by
herrington_d
3y ago
Native parsers used in JavaScript are not always faster due to extra work across languages. Avoiding these overheads and using multi-core are crucial for performance.
52.
▲
by
herrington_d
3y ago
Thanks for the suggestion! I will modify it!
53.
▲
Show HN: JS Crush, a JavaScript Equality Puzzle Game
(js-crush.vercel.app)
2 points
by
herrington_d
3y ago
|
2 comments
54.
▲
by
herrington_d
3y ago
The missing guide for tree-sitter
55.
▲
Deep Dive into AST-grep’s Pattern
(medium.com)
2 points
by
herrington_d
3y ago
|
1 comments
56.
▲
Migrating Bevy Can Be Easier with Semi-Automation. Here Is How
(gist.github.com)
2 points
by
herrington_d
3y ago
|
0 comments
57.
▲
by
herrington_d
3y ago
Thanks! tree-sitter is highly useful but hard to use directly. I hope this tool can help tree-sitter be more used!
58.
▲
Show HN: AST-grep, a grep/eslint/codemod hybrid tool, powered by tree-sitter.
(ast-grep.github.io)
11 points
by
herrington_d
3y ago
|
2 comments
59.
▲
by
herrington_d
4y ago
One thing I really like Verse is it makes prolog/datalog cute.
60.
▲
by
herrington_d
4y ago
Verse is really a disciplined cue-lang on steroid. https://cuelang.org/
More ›