Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dcreager
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
dcreager
1y ago
Yes, if you have a Python version specifed in pyproject.toml, for instance, we respect that, and that's what we use to type-check your code. The default being discussed here is what we fall back on if that project metadata isn't a
32.
▲
by
dcreager
1y ago
To add to the complexity, you have to worry about not just which language you're analyzing , but also which language the type-checker is implemented in. So if we were to do this for ty, we would have to carefully design the internal
33.
▲
by
dcreager
1y ago
Wait wait wait Carl, you did not tell me that the errors we emit need to be correct !! I think I need to go revisit some of my PRs...
34.
▲
by
dcreager
1y ago
At least for the moment, we aren't planning on a plugin architecture. We do recognize that there are some popular libraries and code patterns that aren't easily (or at all) typeable with the current state of the typing spec. We fe
35.
▲
by
dcreager
1y ago
Well, it is a joke...but that said, we're hosting a happy hour which is kinda similar! https://partiful.com/e/Dcrv6XA8PjWTK5Zhw8yr
36.
▲
by
dcreager
1y ago
We do plan to provide an LSP server and VS Code plugin, which will support GTD etc. Though as several others have pointed out (e.g. https://news.ycombinator.com/item?id=43919354 ), it's still very early days for ty, so
37.
▲
by
dcreager
1y ago
There is a formal grammar defined in the CPython repo, implemented in a language called ASDL: https://github.com/python/cpython/blob/main/Parser/Python.as... ty uses the same AST and parser as ruff.
38.
▲
by
dcreager
1y ago
We're going to set up a lemonade stand in the main hall at PyCon next week
39.
▲
by
dcreager
1y ago
> such as claiming `datetime.UTC` doesn't exist) This is a known issue — we're currently defaulting to a conservative Python version, and `datetime.UTC` really doesn't exist until Python 3.11! https://docs.pytho
40.
▲
by
dcreager
2y ago
> it uses salsa from rust for incremental type checking This is true! We're also contributing salsa features upstream where we can, e.g. https://github.com/salsa-rs/salsa/pull/603
41.
▲
by
dcreager
2y ago
The aim is to support both incremental ongoing type checking via something like an LSP server, and also batch type checking for use in e.g. CI. > The entire system is designed to be highly incremental so that it can eventually power a la
42.
▲
by
dcreager
2y ago
np! I also posted a link to Charlie's Bluesky cross-post, which you can read without logging in to anything: https://news.ycombinator.com/item?id=42870359
43.
▲
by
dcreager
2y ago
> does it actually exist? is this currently a closed-source codebase, or is "we're building" future tense? From the thread: > We haven't publicized it to-date, but all of this work has been happening in the open, i
44.
▲
by
dcreager
2y ago
Bluesky cross-post for those who don't want to read the thread on X: https://bsky.app/profile/crmarsh.com/post/3lgvhzdfrps26
45.
▲
by
dcreager
2y ago
> "Precise code navigation" also already exists for TypeScript We had conflated JS and TS support into a single release issue. JS support never landed, but TS did: https://github.blog/changelog/2024-03-14-
46.
▲
by
dcreager
3y ago
This is exactly right. You either end up with something very low-level (on the level of LLVM IR, for instance)—which means you aren't constructing and analyzing high-level language constructs anymore—or with something high-level but wi
47.
▲
by
dcreager
3y ago
This is very cool, well done! I love seeing people get interested in other programming paradigms, like concatenative languages. I gave a talk about them at Strange Loop / PWL last year: https://dcreager.net/talks/
48.
▲
Concatenative programming and stack-based languages (2023) [video]
(youtube.com)
1 points
by
dcreager
3y ago
|
0 comments
49.
▲
Explaining tech's notion of talent scarcity
(nadia.xyz)
74 points
by
dcreager
3y ago
|
38 comments
50.
▲
by
dcreager
4y ago
There are many libraries available that you can use as a libc replacement instead of CCAN, if that’s what you prefer [1-3]. Taking on a beefy dependency like that can be overkill, though, if all you need is a linked list or dynamic array im
51.
▲
by
dcreager
4y ago
Please note that the above link has been claimed by squatters and isn’t the right link for CCAN anymore! The maintainer suggests [1] just using the GitHub repo [2] instead. [1] https://lists.ozlabs.org/pipermail/ccan&#x
52.
▲
by
dcreager
4y ago
For those who haven't seen it, CCAN [1] is a great collection of reusable C code, much of which specifically exists to work around the kinds of issues mentioned in OP. It turns “oh crap I should probably roll my own” into “wait I bet s
53.
▲
by
dcreager
4y ago
This sounds like Cross-Repo Code Navigation [1], which we do support, though only for Python at the moment. And you're right that it does not use the same search index under the covers — OP is specifically describing the index for &quo
54.
▲
by
dcreager
4y ago
It sounds like you are navigating in a language where we currently only support "fuzzy" or "search-based" Code Navigation, which only uses the _unqualified_ symbol name as the search target. As you point out, this can be
55.
▲
by
dcreager
4y ago
> But this could be tied into CI, especially for projects utilizing runners for building the code. One often overlooked drawback of generating this data during CI is that you, the project owner, are now paying for the compute. Of course,
56.
▲
by
dcreager
4y ago
> having "face to face" chitchat, builds up a small buffer of rapport that significantly improves empathy and perceived intent On my team we have a weekly 30-minute meeting for non-work-related updates. A chance to talk about
57.
▲
by
dcreager
5y ago
In short, yes, very much so! Tree-sitter is what we're using under the covers to parse all of the languages that we support. The ctags-like symbol extraction described in the paper comes straight from tree-sitter, too. [1] [1] https
58.
▲
by
dcreager
5y ago
Parsing is definitely a big part of it, and it's a fair point that for search-based Code Navigation, we don't have to do any real heavy lifting on the analysis side. That said, I think the article describes our non-functional requ
59.
▲
by
dcreager
5y ago
Note that this article describes our implementation of “search-based” or “ctags-like” Code Navigation, which definitely has the imprecision that you describe. We've also been working over the previous ~year on a framework called Stack
60.
▲
by
dcreager
5y ago
Many folks have often (correctly!) pointed out that each language's existing parsing packages will be more guaranteed to keep up with language changes. Our hope is that if we can get a critical mass of useful tools that all use tree-s
More ›