However, there is no case for more complicated, multi-file changes or architecture stuff.
128 karma · joined September 6, 2022
However, there is no case for more complicated, multi-file changes or architecture stuff.
Also https://arxiv.org/abs/2406.03283, Enhancing Repository-Level Code Generation with Integrated Contextual Information, uses staic analyzers to produce prompts with more context info.
Yet, the argument does directly translate to the conclusion that typed language is rigorously better for LLM without external tools. However, typed language and its static analysis information do seem to help LLM.
Practically, it was reported that LLM-backed coding agents just worked around type errors by using `any` in a gradually typed language like TypeScript. I also personally observed such usage multiple times.
I also tried using LLM agents with stronger languages like Rust. When complex type errors occured, the agents struggled to fix them and eventually just used `todo!()`
The experience above can be caused by insufficient training data. But it illustrates the importance of eval instead of ideological speculation.
production quality is amazing! I also did some youtube video recently. It is not easy and end product is far from polished.
Really appreciate your help introducing the tool to more people, thanks!
For example, a function annotated with say `query_db(): User can Datebase` means the function can call database and the caller must provide a `Database` handler to call the `query_db`.
The constraint of what can do and not is pretty popular in other programming fields, most notably, NextJS. A server component CANNOT use client feature and a client component CANNOt access server db.
Note that programs can be syntactically well-formed but ill-typed. For example `let x = true + 1` has valid syntax but produces an "undefined" type for the variable `x`, if the type system does not support type error recovery.
A quote from the great paper from POPL 2024, https://hazel.org/papers/marking-popl24.pdf
> If a type error appears _anywhere_, the program is formally meaningless _everywhere_
[1] https://www.jetbrains.com/idea/docs/ssr.pdf [2] https://www.youtube.com/watch?v=YeGPO-UHTbs [3] https://www.jetbrains.com/help/idea/structural-search-and-re... [4] https://www.jetbrains.com/help/go/structural-search-and-repl... [5] https://www.jetbrains.com/help/pycharm/structural-search-and...
In this blog post, we will delve into the challenges addressed by this feature and explore the design that shaped its implementation. We also believe this post can serve as a general guide to crafting balanced TypeScript types.
I wonder how you transition from tree-sitter to other builtin parsers? Tree-sitter gave a unified interface to all languages. Using language native parsers will require significant work for various FFI if I am not wrong.
ast-grep now supports a feature to handle language injection, allowing you to search for code written in one lanuage within documents of another language.
I appreciate OP's ideas about how this project is compared to Streamlit?
Having a strong validation and observation toolset based on the DSL brings more value than the language itself. DSL constrains its semantics so it is easier to build tools on it.
There is some optimization to [skip parsing](https://github.com/ast-grep/ast-grep/blob/9f8ed5fb2abf35d928...) but generally I don't expect ast-grep can beat ripgrep or amber. (but sometimes ast-grep can beat grep due to parallel processing)
More specifically for the "string constant" search/replace, you can see the playground example!
https://ast-grep.github.io/playground.html#eyJtb2RlIjoiUGF0Y...