Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pornel
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
241.
▲
by
pornel
11mo ago
there's table-layout:fixed that makes rendering of large tables much faster. I'd argue that if you have so many rows that DOM can't handle, humans won't either. Then you need search, filtering, data exports, not JS attac
242.
▲
by
pornel
11mo ago
Yeah, Rust closures that capture data are fat pointers { fn*, data* }, so you need an awkward dance to make them thin pointers for C. let mut state = 1; let mut fat_closure = || state += 1; let (fnptr, userdata) = make_trampol
243.
▲
by
pornel
11mo ago
I've had similar experience when the compiler immediately found unsynchronized state deep inside a 3rd party library I've been using. It was a 5-minute fix for what otherwise could have been mysterious unreproducible data corrupti
244.
▲
by
pornel
11mo ago
There's Rust for Dreamcast ( https://dreamcast.rs ) via Rust's GCC backend.
245.
▲
by
pornel
11mo ago
If you create wrappers that provide additional type information, you do get extra safety and nicer interfaces to work with.
246.
▲
by
pornel
11mo ago
Apple is extending Swift specifically for kernel development.
247.
▲
by
pornel
11mo ago
In Rust dev, I haven't needed Valgrind or gdb in years, except some projects integrating C libraries. Probably kernel dev isn't as easy, but for application development Rust really shifts majority of problems from debugging to com
248.
▲
by
pornel
11mo ago
There's always someone willing to write COBOL for the right premium. I'm working on Rust projects, so I may have incomplete picture, but I'm from what I see when devs have a choice, they prefer working with Rust over C++ (if
249.
▲
by
pornel
11mo ago
The idea behind the safe/unsafe split is to provide safe abstractions over code that has to be unsafe. The unsafe parts have to be written and verified manually very carefully, but once that's done, the compiler can ensure that al
250.
▲
by
pornel
11mo ago
m68k Linux is supported by Rust, even in the LLVM backend. Rust also has an experimental GCC-based codegen backend (based on libgccjit (which isn't used as a JIT)). So platforms that don't have either LLVM nor recent GCC are screw
251.
▲
by
pornel
11mo ago
What's really nice is where you don't need defensive programming in Rust. If your function gets ownership of, or an exclusive reference to an object, then you know for sure that this reference, for as long as it exists, is the o
252.
▲
by
pornel
11mo ago
> So at least those are a subset of Go's concurrency model. That's why the article about structured concurrency compared it to goto. Everything is a subset of goto. It can do everything that structured programming can do, and m
253.
▲
by
pornel
11mo ago
Swap can be fine on desktops where usage patterns vary a lot, and there are a bunch of idle apps to swap out. It might be fine on a server with light loads or a memory leak that just gets written out somewhere. What I had in mind was server
254.
▲
by
pornel
11mo ago
You do the same thing, if that's really the architecture you need. Channels communicating between persistent workers are fine when you need decoupled asynchronous operation like that. However, channels and detached coroutines are less
255.
▲
by
pornel
11mo ago
Even on Linux with overcommit you can have allocations fail, in practical scenarios. You can impose limits per process/cgroup. In server environments it doesn't make sense to run off swap (the perf hit can be so large that everyth
256.
▲
by
pornel
11mo ago
Thread safety metadata in Rust is surprisingly condensed! POSIX has more fine-grained MT-unsafe concepts than Rust. Rust data types can be "Send" (can be moved to another thread) and "Sync" (multiple threads can access t
257.
▲
by
pornel
11mo ago
There are other possible explanations, e.g. AVC and HEVC are set to the same bitrate, so AVC streams lose quality, while AV1 targets HEVC's quality. Or they compare AV1 traffic to the sum of all mixed H.26x traffic. Or the rates vary i
258.
▲
by
pornel
11mo ago
I've been writing async Rust for as long as it existed, and never ran into any cancel-safety issue. However, I also never used tokio's select macro.
259.
▲
by
pornel
11mo ago
It depends how you actually use the messages. Zero-copy can be slowing things down. Copying within L1 cache is ~free, but operating on needlessly dynamic or suboptimal data structures can add overheads everywhere they're used. To actua
260.
▲
by
pornel
11mo ago
I've switched to Home Assistant, and it's sooo much better. Home Assistant can even share devices with Home app, so you can still use "Siri, turn off the lamp" to have it answer "you don't have any alarms set&q
261.
▲
by
pornel
11mo ago
AV2 is in the works, so I guess we'll have AVIF2 soon, and another AVIF2 vs JPEG XL battle.
262.
▲
by
pornel
11mo ago
Cargo's cache is ridiculously massive (half of which is debug info: zero-cost abstractions have full-cost debug metadata), but you can delete it after building. There's new-ish build.build-dir setting that lets you redirect Cargo&
263.
▲
by
pornel
11mo ago
By alluding the switch to Rust was "without cause", and bringing up concerns of floppy users and retro-hobby hardware, you seem to be seeing the change only from a very narrow perspective of interests of very specific group of use
264.
▲
by
pornel
11mo ago
The situation today is very different than what it used to be when people actually used 386 or Amigas because they had no other options (BTW, Rust supports m68k, just not AmigaOS specifically). Today even crappiest old PCs that you can fish
265.
▲
by
pornel
11mo ago
That's just your lack of familiarity with the foreign-to-you language (you may be unable to read Korean too, despite Korean being pretty readable). Syntactically, Rust is pretty unambiguous, especially compared to C-style function and
266.
▲
by
pornel
11mo ago
Cargo isn't satisfied with its own solver either. Solvers are a hard and messy problem. The problem is theoretically NP complete (a SAT solver), but even harder than that: users also care about picking solutions that optimize for multi
267.
▲
by
pornel
11mo ago
I'm happy to burden EU companies with responsibilities like securing storage of my private data, having processes to update and delete my data, having to consider whether data collection can be minimized, and getting my consent if they
268.
▲
by
pornel
11mo ago
Chrome is already in the process of removing libpng.
269.
▲
by
pornel
11mo ago
unwrap() is only the most superficial part of the problem. Merely replacing `unwrap()` with `return Err(code)` wouldn't have changed the behavior. Instead of "error 500 due to panic" the proxy would fail with "error 500
270.
▲
by
pornel
11mo ago
1. Cloudflare is in the business of being a lightning rod for large and targeted DoS attacks. A lot of cases are attacks. 2. Attacks that make it through the usual defences make servers run at rates beyond their breaking point, causing al
More ›