Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
exDM69
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
exDM69
9mo ago
Using printf in shaders is awesome, it makes a huge difference when writing and debugging shaders. Vulkan and GLSL (and Slang) have a usable printf out of the box, but HLSL and D3D do not. Afaik the way it works in Vulkan is that all the st
32.
▲
by
exDM69
9mo ago
Maybe this would be a suitable application for "Fibonacci hashing" [0][1], which is a trick to assign a hash table bucket from a hash value. Instead of just taking the modulo with the hash table size, it first multiplies the hash
33.
▲
by
exDM69
9mo ago
> why is it not trivial to add a path stage as an alternative to the vertex stage? Because paths, unlike triangles are not fixed size or have screen space locality. Paths consist of multiple contours of segments, typically cubic bezier c
34.
▲
by
exDM69
9mo ago
> NV_path_rendering solved this in 2011. By no means is this a solved problem. NV_path_rendering is an implementation of "stencil then cover" method with a lot of CPU preprocessing. It's also only available on OpenGL, not
35.
▲
by
exDM69
10mo ago
Yes, sadly this isn't a part of standard C or C++. It is available as a language extension in Clang and GCC and widely used (e.g. by the Linux kernel). Unfortunately it is not supported by the third major compiler out there so many pro
36.
▲
by
exDM69
10mo ago
> tons of drivers that dont implement the extensions that really improve things. This isn't really the case, at least on desktop side. All three desktop GPU vendors support Vulkan 1.4 (or most of the features via extensions) on all
37.
▲
by
exDM69
10mo ago
Anything involving people on the ground is just too slow. It takes radars, interceptor drones, sensor networks, etc. Stuff like this is in active development but not widely deployed yet.
38.
▲
by
exDM69
10mo ago
I've seen my fair share of frontline combat videos from Ukraine. The hard part isn't shooting a drone when it is in shotgun range. It's getting the shooter close enough to the drone to have a chance of taking the shot in the
39.
▲
by
exDM69
10mo ago
The drones here aren't your neighbor's kids' quadrotors. Some sightings over airports have been large (>2m) fixed wing aircraft travelling at 200 km/h. Even the quads are pretty fast. And they can appear out of nowher
40.
▲
by
exDM69
10mo ago
> Rust has native SIMD support std::simd is nightly only. > while in standard C there is no way to express that. In ISO Standard C(++) there's no SIMD. But in practice C vector extensions are available in Clang and GCC which are
41.
▲
by
exDM69
10mo ago
> If the DoD enforces the requirement for Ada, Universities, job training centers, and companies will follow DoD did enforce a requirement for Ada but universities and others did not follow. The JSF C++ guidelines were created for circu
42.
▲
by
exDM69
10mo ago
Correct me if I'm wrong but during this timeframe (circa 2005), Java was not open source at all. OpenJDK was announced in 2006 and first release was 2008, by which time the days Java in the browser were more or less over.
43.
▲
by
exDM69
10mo ago
Exactly. Java was so buggy and had so many security issues about 20 years ago that my local authorities gave a security advisory to not install it at all in end user/home computers. That finally forced the hand of some banks to stop us
44.
▲
by
exDM69
10mo ago
The project itself is cool and useful but the motivating example of crypto (primitives?) isn't great. Cryptography is already difficult to write in high level languages without introducing side channels via timing, branch predictor, ca
45.
▲
by
exDM69
10mo ago
Hi, I don't have public examples to share but I can give an explanation of a simple scenario. I have a container of resources, e.g. textures. When the GPU wants to use them, CPU will lease them until a point of time in the future denot
46.
▲
by
exDM69
10mo ago
I've used recovering from poisoned state in impl Drop in quite a few places. In my case it's usually waiting for the GPU to finish some asynchronous work that's been spun up by CPU threads that may have panicked while holding
47.
▲
by
exDM69
10mo ago
Worth noting that this is not `std::mutex` or `parking_lot::mutex` as discussed in the article, but `tokio::sync::Mutex` in cancellable async code.
48.
▲
by
exDM69
10mo ago
I disagree, lock poisoning is a good way of improving correctness of concurrent code in case of fatal errors. As demonstrated by the benchmarks in this article, it's not very expensive for typical use cases. In 99% of the cases where o
49.
▲
by
exDM69
11mo ago
> A f32x16 version would also be faster on 256b hardware, but spill in SSE. For Zen5 you probably want to use f32x32. Yeah, exceeding native vector width is kinda just adding another round of loop unrolling. Sometimes it helps, sometime
50.
▲
by
exDM69
11mo ago
> Getting maximum performance out of SIMD requires rolling your own code with intrinsics Not disagreeing with this statement in general, but with std::simd I can get 80% of the performance with 20% of the effort compared to intrinsics. F
51.
▲
by
exDM69
11mo ago
Despite all of these issues you mention, std::simd is perfectly usable in the state it is in today in nightly Rust. I've written thousands and thousands of lines of Rust SIMD code over the last ~4 years and it's, in my opinion, a
52.
▲
by
exDM69
11mo ago
In my experience, compiling C with -ffast-math will tremendously improve floating point autovectorization and optimizations to SIMD (C vector extensions, which are similar to Rust std::simd) code in general. This obviously has a lot of cave
53.
▲
by
exDM69
11mo ago
Two more from the world of analog music/guitar electronics: 1) Ring modulator: https://en.wikipedia.org/wiki/Ring_modulation A device used to multiply two analog signals in time domain. Best known for the sound of
54.
▲
by
exDM69
1y ago
> To kill the thread, set the stop flag and cond_signal the condvar This is a race condition. When you "spin" on a condition variable, the stop flag you check must be guarded by the same mutex you give to cond_wait. See this ar
55.
▲
by
exDM69
1y ago
> I am sadly aware, but I won't switch until the complexity is fixed It pretty much is by now if you can use Vulkan 1.4 (or even 1.3). It's a pretty lean and mean API once you've got it bootstrapped. There's still a l
56.
▲
by
exDM69
1y ago
Maybe worth venturing into the embedded land? There are some pretty cool Rust embedded projects (e.g. embassy) which are sort of best of both worlds. You get to do low level hardware tinkering (which arguably requires a systems programming
57.
▲
by
exDM69
1y ago
The osdev wiki is the best source for this and they have the bare bones tutorials with all the linker scripts, bootstrap code, makefiles, etc you might need. They have examples for multiboot and UEFI (and BIOS boot sector). For Rust there&#
58.
▲
by
exDM69
1y ago
> hobby wheel reimplementation projects like this, I find doing it as close to the bare metal as possible, relying on the minimum amount of other people's code, a lot more fun. As a chronic wheel reinventor, I can understand this. B
59.
▲
by
exDM69
1y ago
Having built a few bare metal and hobby OS projects over the years, I would not recommend the path taken in this tutorial series. Because if you want to write an OS, don't write a bootloader first. This article essentially describes a
60.
▲
by
exDM69
1y ago
> I wish hardware vendors would just stop trying to write software. How would/should this work? Release hardware that doesn't have drivers on day one and then wait until someone volunteers to do it? > Intel had great success
More ›