Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Panzerschrek
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
Panzerschrek
6d ago
It's technically possible to perform arena-based allocation and still have compiler checks. The compiler just need to track objects allocated with an allocator and prevent destructing the allocator itself as long as there is at least o
2.
▲
by
Panzerschrek
6d ago
But with static analysis it's still possible to miss some leaks or to have false-positives. That's why an integrated language mechanism preventing such leaks is much better.
3.
▲
by
Panzerschrek
6d ago
> Rust: Drop runs automatically at scope end, so this specific bug simply doesn’t exist. That's why having no auto-destructors is a dead-end. This is the greatest mistake of such languages like Zig or Odin.
4.
▲
by
Panzerschrek
6d ago
Pretty strong censorship. That's why I can't even open this link in my country.
5.
▲
by
Panzerschrek
7d ago
> recover from common syntax errors It's a dead-end. Sure, it can work in simple cases, but there will be always a case where such syntax recovery isn't possible. That's why relying only on syntax recovery isn't an op
6.
▲
by
Panzerschrek
7d ago
TCP isn't really necessary. Usually a language server just uses stdin/stdout, which are just pipes. And overall overhead for running a language server in a separate process isn't that big. LSP is designed in such a way that o
7.
▲
by
Panzerschrek
7d ago
A lot of things described in this article applicable not only for Rust, but for almost any language. Like it's obvious that requests should be handled asynchronously and that conversions from/to UTF-16 are needed. But it's ac
8.
▲
by
Panzerschrek
8d ago
> the simplest infinite loop An infinite loop which does nothing is practically useless. So, compilers optimize it out. That's the whole philosophy of modern compilers - to reduce execution time by preserving semantics. In case of a
9.
▲
by
Panzerschrek
8d ago
I don't see how it can be useful. It's almost always an error to write such a loop. The only reason for it to exist is in very low-level code to do nothing, but for such cases using something like an external function written in a
10.
▲
by
Panzerschrek
10d ago
Am I right that Voodoo had no early depth test and thus triangles are textured even if they are completely obstructed?
11.
▲
by
Panzerschrek
11d ago
For a couple of days I experimented with auto-vectorization in my language which uses LLVM as its backend. In my example I had a simple function multiplying elements from two arrays and writing them in the third one. And it worked as expect
12.
▲
by
Panzerschrek
13d ago
> If you didn't have that guarantee, at worst your mutex's guard object would be immediately dropped For named local variables it's a different story. They should remain alive until the end of their lexical scope. But for
13.
▲
by
Panzerschrek
14d ago
> In Rust variables are not destroyed after the last borrow ends but instead when it goes out of scope That's the problem. Once I had a tricky case, where I locked a mutex in a match expression only to read a single field to match
14.
▲
by
Panzerschrek
14d ago
> Exactly the way you suggest, as an optional add-in No, I don't suggest it, but criticize it. Rust performs its checking as a separate step after actual compilation, which sometimes leads to strange behavior (like borrow errors ar
15.
▲
by
Panzerschrek
14d ago
> Borrow Checking It's very confusing name for this feature. It suggest that some sort of borrowing takes place and that it's just an optional check, which isn't the case. It should be named something like "enforced s
16.
▲
by
Panzerschrek
16d ago
Once I have implemented such tiling using shadertoy. Source code: https://github.com/Panzerschrek/shader_bits/blob/master/penr... . No recursion is really needed (which isn't supported in shaders), b
17.
▲
by
Panzerschrek
17d ago
> We claim that C achieves real-time program verification, i.e., the user can carry out verification as they program the implementation code incrementally. It achieves this goal by orchestrating the symbolic-execution engine and the LCF-
18.
▲
by
Panzerschrek
20d ago
"white IP address" is an address that your internet provider gives you and which is accessible from the whole internet, not just some address local for the provider's network and hidden behind NAT. Since IPv4 addresses are sc
19.
▲
by
Panzerschrek
20d ago
> you can choose at use site This is possible in C++ too, but it may require extra work. But is it really needed that often to use both kinds of polymorphism for the same type? > the size of the objects do not pay for dynamic dispatch
20.
▲
by
Panzerschrek
20d ago
> A trait must follow so-called object safety rules to be used as a trait object This seems for me to be a major design flaw of Rust. It tries to repurpose traits for dynamic polymorphism, even if this doesn't fit perfectly. C++ is
21.
▲
by
Panzerschrek
20d ago
I once faced a tricky bug involving fat pointers (containing virtual tables) in Rust. Two such pointers may be distinct, even if they reference to the same object, because (for some reason) the compiler may create two (or even more) copies
22.
▲
by
Panzerschrek
20d ago
Making self-hosting really accessible isn't that easy, even if it's easy to setup the server machine itself. One needs to make their server machine accessible to everyone, which isn't generally possible due to how networks wo
23.
▲
by
Panzerschrek
23d ago
Nice, but particles (smoke, blood) are not ASCII.
24.
▲
by
Panzerschrek
25d ago
It looks suspicious. It has only 18 commits, the majority of code was added via single initial commit. is it LLM-generated?
25.
▲
by
Panzerschrek
27d ago
It's a common situation for many quotes of such kind. Taken out of context they loose or completely change their initial meaning.
26.
▲
by
Panzerschrek
27d ago
This can work only for toy projects with no complex build scripts and without dependencies fetched not via git.
27.
▲
by
Panzerschrek
27d ago
The program described in this article is as simple as possible. What about something more complex, like basic "hello world"? It requires at least one more syscall and several bytes more data.
28.
▲
by
Panzerschrek
28d ago
It was maybe cool 50 years ago or so. Nowadays it's no longer needed. Possible performance gains of such code are marginal and modern programming languages allow generating many specialized and optimized code pieces using the same temp
29.
▲
by
Panzerschrek
29d ago
Are chain-of-trust attacks real? Is it necessary to make so much effort to avoid what supposedly never happened?
30.
▲
by
Panzerschrek
1mo ago
Such trick looks interesting. But I think for many cases it would be better to use fixed-width arithmetic based on 128-bit integers. Operations for them are much cheaper if done right (and assuming compilers are smart enough to optimize the
More ›