Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pkolaczk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
31 ms
·
391.
▲
by
pkolaczk
4y ago
It does not guarantee, but it is actually quite hard to cause a memory leak by accident, because at the same time Rust makes creating cycles hard.
392.
▲
by
pkolaczk
4y ago
This illustrates a problem with many "modern" applications. My first impression: "Oh, that looks nice. Looks like in real life". Then I tried using it and found that it is clunky and slow to the point it is barely usable
393.
▲
by
pkolaczk
4y ago
Wifi and Bluetooth... Yeah. It's not good on DSLRs either. My Pentax K1 has WiFi option, and, otherwise being an excellent camera in terms of imaging quality, build, ergonomics, good UI, it has somehow unreliable and cumbersome wifi -
394.
▲
by
pkolaczk
4y ago
> the JVM checks at runtime for overflows It doesn't. Overflows wrap around in Java. > dangling pointers Only to managed memory. You may still allocate something through Unsafe and you're on your own, just as in Rust. And so
395.
▲
by
pkolaczk
4y ago
Scala hasn't eaten Java's lunch, so how Kotlin could?
396.
▲
by
pkolaczk
4y ago
IMHO that would be a dead end. I prefer passing self explicitly and I still hope it will be possible to bind self partially in the future, e.g bind only one field. Currently if you call a function that e.g returns a reference to a field, th
397.
▲
by
pkolaczk
4y ago
Toy benchmarks give JVM an edge because JVM optimizes code locally. Small amount of code in a benchmark means a majority of it can be inlined and then the JVM can actually remove a lot of Java-specific overhead like heap allocations, at lea
398.
▲
by
pkolaczk
4y ago
Goggle's Rune is even a smaller hobby project.
399.
▲
by
pkolaczk
4y ago
There already exists Rune programming language and that one was earlier: https://rune-rs.github.io/ They should be more careful picking the name.
400.
▲
by
pkolaczk
4y ago
If it's deployed in K8s, it would be restarted automatically after dying.
401.
▲
by
pkolaczk
4y ago
Thank you. That makes sense!
402.
▲
by
pkolaczk
4y ago
Thank you, this is very useful. But I have some more doubts. What is that space-time actually? Is there a global single space-time or does everyone has its own? Let's assume the starting point of my travel have coordinates (x: 0, y: 0,
403.
▲
by
pkolaczk
4y ago
Nice explanation. I don't get the problem with traveling to stars though. If I could move at the speed of light through space, then I'd be not moving through time, which means the time to travel anywhere, as measured by me would
404.
▲
by
pkolaczk
4y ago
Sure it doesn't do placement new yet , but I think you're exaggerating the effect on lack of copy elision. Rust doesnt really need copy elision so heavily because it defaults to moving stuff, and move is just a very shallow copy
405.
▲
by
pkolaczk
4y ago
The optimizing backend for Rust and C++ is common. So if it didn't get optimized in Rust, it is very likely it wouldn't be in C++ as well. However, the code style of those two codebases might be different. IMHO C++ code is traditi
406.
▲
by
pkolaczk
4y ago
It would be more informative if the stack metrics were paired with heap metrics. You can trivially avoid stack to stack copies by allocating on the heap and passing pointers / references. But that is often actually slower, because heap
407.
▲
by
pkolaczk
4y ago
Most of the new development is not about adding new features but about removing limitations and making existing features more orthogonal. GATs technically aren't introducing a new thing. They just allow to use the already existing gene
408.
▲
by
pkolaczk
4y ago
As long as you don't get too crazy with references in structures or async code, lifetimes are not going to chase you.
409.
▲
by
pkolaczk
4y ago
In this case each request is very tiny amount of work on the client, so waking up a thread to do that work just to immediately block waiting on the response from the server is very wasteful. With async you can send hundreds of requests in a
410.
▲
by
pkolaczk
4y ago
However, when a tracing GC runs, it has to touch massive amounts of cold data and pushes hot data out of cache. Traditional malloc/free touches data in small chunks and freeing happens close to the last use, so when most of the data is
411.
▲
by
pkolaczk
4y ago
Actually in this case async is the only way to get sane performance and both drivers deliver excellent performance thanks to async. I've been using Scylla Rust driver in my C* benchmarking project and it is an order of magnitude faster
412.
▲
by
pkolaczk
4y ago
No, they will converge on a value with higher timestamp. And timestamps are controllable by your app, so you can guarantee they are monotonic.
413.
▲
by
pkolaczk
4y ago
> Different nodes could have and return different data. Only if they miss some writes, and eventually they will converge. But if you do quorum writes and quorum reads (or local quorum W + local quorum R), this guarantees you'll read
414.
▲
by
pkolaczk
4y ago
> Still, in that respect it's better than Rust as it makes it easier to focus on the problem rather than the language. Quite the opposite. In Go/Java I find myself frequently thinking how to adapt my problem so it can be expres
415.
▲
by
pkolaczk
4y ago
> is so fragmented you can’t build libraries generically for async runtimes How does futures.rs work generically with different async runtimes then?
416.
▲
by
pkolaczk
4y ago
> for applications that can easily fit within standard containers and standard allocation paradigms, C++ actually works really well already. Use your smart pointers. Use your containers. Follow the rules everyone tells you about not usin
417.
▲
by
pkolaczk
4y ago
You're making a silent assumption that the original team is well informed about why the things are like they are and that they know what they are doing. I think it is not always the case. I've been to a project once where the mess
418.
▲
by
pkolaczk
4y ago
I didn't mean MVC so much, as message passing between the view and the model. Safe Rust has no problem with MVC nor its derivatives.
419.
▲
by
pkolaczk
4y ago
> That of course have an overhead, but it is not allocation rate, or deallocation rate, as both of those are just pointer bump and reuse region Sure. GC makes some particular operations faster at the expense of adding overhead in a few
420.
▲
by
pkolaczk
4y ago
Yet, web developers have been using some of those exotic patterns for ages and they don't complain. They even prefer that way to traditional GUIs by using Electron massively now. Rust GUI frameworks are typically based on strict separa
More ›