Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
matklad
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
16 ms
·
151.
▲
by
matklad
5y ago
I don’t think that when people say “Rust has ugly syntax” they mean that Rust has ugly syntax. It seems that what they are complaining about is actually Rust semantics, which needs extra syntax to express it. Blog post idea: express this sn
152.
▲
by
matklad
5y ago
> When you send a string to the shell for execution, it seems reasonable to expect >, semi-colons, pipes, and other shell operators to be interpreted by the shell unless you escape them. Fully agree here. But the problem is the secon
153.
▲
by
matklad
5y ago
To avoid confusion for future readers: the second part of the post, the part which contains the quote, talks about VS Code `ShellExedution` API. This API is unrelated to node’s `child_process` module. The absence of clear docs on `ShellExec
154.
▲
by
matklad
5y ago
Are there any plans regarding first class support for LSP (or, more generally and perhaps more useful, first class support for extensions providing semantic knowledge about the code)? I know that LSP plugin exists, but, anecdotally, folks a
155.
▲
by
matklad
5y ago
It seems like in your case the easiest path might be to learn how the language works and see it for yourself. Otherwise, I think these posts are roughly in the genre you want: * http://dtrace.org/blogs/bmc/2018
156.
▲
by
matklad
6y ago
I do :) I don’t write web services, so I have low O(1) things to communicate with, for which threads with blocking read work OK. They are not perfect, as there is no cancellation, but working around lack of cancellation in a couple of place
157.
▲
by
matklad
6y ago
In theory, they are equivalent. In practice, POSIX blocking IO does create problems around cancellation and selectability. For example, there’s no good way to cancel an outstanding blocking read call, and you might need to do weird hops to
158.
▲
by
matklad
6y ago
I don’t think every benchmark should be a benchmark of everything. Targeted micro benchmarks are valuable, if they are explicit about their applicability scope. The post is very direct about looking only at the memory usage, and literally s
159.
▲
by
matklad
6y ago
Thanks for the correction, that is indeed a bug!
160.
▲
by
matklad
6y ago
Thanks, RSS not counting memory for page tables themselves is a good point, I will correct that in the article tomorrow.
161.
▲
by
matklad
6y ago
Actually, chrome added support for `hypthen: auto` not so long ago!
162.
▲
by
matklad
6y ago
+1 One trick here is to keep in the source , every sentence on a separate line. That way, it's hard to miss complicated sentences. As a bonus, docs become easier to diff. rust-analyzer does this: https://raw.githubuserconte
163.
▲
by
matklad
6y ago
That’s a fair observation! In my defense, rust-analyzer is a deep and complex project, so there’s a lot of stuff to describe. It’s closer to the 200k end.
164.
▲
by
matklad
6y ago
> A picture can tell a thousand words FWIW, this is generally false: https://graydon2.dreamwidth.org/193447.html
165.
▲
by
matklad
6y ago
Some high-level property of the code which does not change as you add new features. A good example would be “the model layer does not depend on the view layer”.
166.
▲
by
matklad
6y ago
It makes sense to invest into more thorough multi page doc, and have people/process in place to maintain it. rustc guide would be a good example: https://rustc-dev-guide.rust-lang.org/about-this-guide.html
167.
▲
by
matklad
6y ago
I disagree with this characterization. ARCHITECTURE.md is specifically engineered to be low churn, so in this respect it is meaningfully different from other “keep docs” advise. In practice, I personally didn’t find it difficult to maintain
168.
▲
by
matklad
6y ago
We have something similar in https://github.com/rust-analyzer/rust-analyzer/blob/master/d... . An interesting systemsy difference is that missing style.md means more work for maintainers (as they need to
169.
▲
by
matklad
6y ago
Revise it twice a year. If the document gets stale faster than that, just delete the stale bits: they are probably too low level for this kind of documentation.
170.
▲
by
matklad
6y ago
Yeah, I indeed spend some effort to steal the fonts from asciidoctor and https://www.teamten.com/lawrence/programming/ (highly recommend both). And yes, I myself am struggling with ragged right. I really wish to h
171.
▲
by
matklad
6y ago
>And every single language server has to reimplement all these from scratch. This is mostly true about IDEA as well. Take a look at the extractFunction implementation from IntelliJ Rust: https://github.com/intellij-rust&#
172.
▲
by
matklad
6y ago
It is unclear what exactly you wish to turn off, but you might be looking for this option: https://rust-analyzer.github.io/manual.html#rust-analyzer.di...
173.
▲
by
matklad
6y ago
The higher order bit here is indeed funding: ides are deep and complex, they need a lot of focus . The internal architecture (or rather culture) of making the thing easy to work with is also an important factor. For example, this very docu
174.
▲
by
matklad
6y ago
I agree with your general sentiment: there’s a lot of powerful features and de-duplication one gets with a single engine to analyze many languages, a-la IDEA. At the same time, there’s quite a bit of synergy if you go in the other direction
175.
▲
by
matklad
6y ago
FWIW, this should be relatively easy to implement. Looking at all the pieces which implement https://github.com/rust-analyzer/rust-analyzer/blob/master/d... should given enough knowledge to do this.
176.
▲
Why an IDE?
(matklad.github.io)
3 points
by
matklad
6y ago
|
1 comments
177.
▲
by
matklad
6y ago
Urgh, I now feel sad that I haven't ordered v1 earlier :-( I definitely prefer the absence of backlighting and completely blank keycaps.
178.
▲
by
matklad
6y ago
Not a native speaker, and have giant problems with spelling in my mother tongue, so I confuse words in writing all the time. Thing vs think is the worst. That's why there's "fix typo" link at the end :-)
179.
▲
Notes on Paxos
(matklad.github.io)
154 points
by
matklad
6y ago
|
22 comments
180.
▲
by
matklad
6y ago
This is an exceptionally great article, which indeed discusses strong Rust limitations. I have one question: the parser in the article uses computed goto, which, as far as I know, is not standard C. Are there many cases where even the sta
More ›