Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
exDM69
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
211.
▲
by
exDM69
3y ago
I've used OpenGL for over 20 years and Vulkan since it came out. Neither of them is easy, but OpenGL's complexity and awkward stateful programming model is quite horrific. I've also watched and helped beginners struggling wit
212.
▲
by
exDM69
3y ago
Drawing conclusions from a hello world example is not representative of which API is "easier". You are also using lines of code as measure of "ease" where it's a measure of "verbosity". Further, the OpenGL
213.
▲
by
exDM69
3y ago
The ability to distinguish direction from a sound is based on the human ear frequency response being very directional. Your left ear will hear a sound coming from the right very differently than from the left. This is predominantly because
214.
▲
by
exDM69
3y ago
Yes, but not at a resolution that would be useful for echolocation. Humans can't distinguish individual echo pulses with millisecond granularity needed for meter-scale accuracy, yet humans can learn bat-like echolocation skills.
215.
▲
by
exDM69
3y ago
Bat (and human) echolocation is not based on distinguishing sonar pings in time domain, but rather listening to the frequency spectrum of the reverberating sound, ie. "measuring" the impulse response of the surroundings. Sending a
216.
▲
by
exDM69
3y ago
I think that's the benchmarks I allude to in the GP post. Table 1 on page 3 is absolute gold, it quantifies the indirect costs by listing the number of cache lines and TLB entries evicted. The numbers are much larger than I remembered.
217.
▲
by
exDM69
3y ago
TLB Flushing and dcache/icache evicting hot cache lines in favor of the instructions and data needed by kernel mode. It takes a while of normal operation until these are populated again with the hot data, until then the system overall
218.
▲
by
exDM69
3y ago
This micro benchmark measures the direct cost of system calls. But flushing the TLB and trashing the caches carries an indirect cost too. According to some benchmarks I've seen (sorry no link), a system call in the middle of a memory h
219.
▲
by
exDM69
3y ago
Additionally the panic = "abort" disables stack unwinding, and running destructors when panic occurs, so it's a big change to the semantics of the program. It's comparable to C++ land -fno-exceptions (not exactly, but si
220.
▲
by
exDM69
3y ago
> So even the Lamport bakery algorithm requires memory barriers, because modern processors can reorder instructions? Yes, that is correct. Memory ordering needs to be enforced with barriers for correctness. > Does this mean that moder
221.
▲
by
exDM69
3y ago
No, it can not use relaxed memory ordering. Looking at disassembly of relaxed atomic operations, they are just normal loads and stores with no memory barriers or special instructions. That is not enough to make this algorithm guard a critic
222.
▲
by
exDM69
3y ago
Even if the algorithm "works", it does not guard the critical section correctly. The code that is supposed to go between lock() and unlock() may be executed before the lock is acquired or after it is released because CPU is allowe
223.
▲
by
exDM69
3y ago
Exactly. A load from or store to memory protected by a mutex could be executed before the store that sets the mutex as locked. Unless there is an appropriate kind of memory barrier in between.
224.
▲
by
exDM69
3y ago
> Even if this read and write are not atomic, the system still works This statement is not really true for modern computers, especially ARM and other architectures which are more sensitive to memory orderings than x86 CPUs. The reason is
225.
▲
by
exDM69
3y ago
Unfortunately a battery powered leaf blower sound is almost as annoying as a combustion engine powered one. It's "quieter" for sure if decibels are measured but it makes a quite loud high pitch brain piercing squeal. I have n
226.
▲
by
exDM69
3y ago
> But it definitely needed to be VR to be helpful Head tracking (like TrackIR) is another option, perhaps even better than VR for flight sims because you can see your hand and your controllers.
227.
▲
by
exDM69
3y ago
> The huge drop in 2022 scores can be explained through the longer school closure period during the pandemic lockdowns The latest PISA scores arrived just last week or so and do not support this. There is a very weak negative correlati
228.
▲
by
exDM69
3y ago
The original chip was built with 1970s NMOS semiconductor technology. While you can theoretically build the same analog circuitry using discrete N-channel MOSFETs, it will not capture the tone of the original. In particular the "operat
229.
▲
by
exDM69
3y ago
The original game does not work great on modern operating systems and screen resolutions etc. Text sizes, GUI scaling is usually way off in games from this era. Using the "modernized" open source engine gives you a better experien
230.
▲
by
exDM69
3y ago
Owning a property comes with property taxes. And will make you ineligible for a lot of the benefits. And speaking of said benefits, it's a part time job keeping up with the paperwork. And the Nordics are a cold place, you either need t
231.
▲
by
exDM69
3y ago
Yes, you can for example require the first datagram in a connection to have a cryptographically signed blob of data (also useful for key exchange). But then you need some mitigation against a simple replay attack (client sends same packet t
232.
▲
by
exDM69
3y ago
Yes, TCP has flow control and congestion avoidance. But it's a one size fits all model designed for unreliable connections of yesteryear. It's a trade off between latency and throughput and not particularly good at either when net
233.
▲
by
exDM69
3y ago
The reason for uTP using UDP is clear. When you are sending a complete file from one computer to another, you can send it in any order. With TCP the packets need to arrive in order (at least within the sliding window) or they get rejected w
234.
▲
by
exDM69
3y ago
Video games have a very good reason to use UDP: latency and lack of head of the line blocking. This also applies to video and audio live streams. But it's not the only reason to use UDP. It can open connections faster, accept out of or
235.
▲
by
exDM69
3y ago
I'm starting to think that TCP is past its prime and UDP based protocols (like QUIC) are the way forward. The problem is exacerbated by TLS encryption. It requires six packets, or three round trip times, to establish a TLS over TCP con
236.
▲
by
exDM69
3y ago
C and C++ have safety certified implementations available for certain platforms from proprietary vendors. The language itself isn't, and neither are Clang or GCC upstream versions. In addition to the compiler, writing safety certified
237.
▲
by
exDM69
3y ago
When was this? When WebGL was a new thing, there was no protection whatsoever and an uninitialized textures and buffers could contain stale data from other processes. But this has been fixed like a decade ago. In any case, what you saw is n
238.
▲
by
exDM69
3y ago
Virtual threads, or green threads use a co-operative threading/coroutine model on top of the preemptive threads provided by the OS. In addition to Java virtual threads, similar systems exist in Go goroutines, Rust async and Haskell gre
239.
▲
by
exDM69
3y ago
It uses emulated audio chips from Mame emulator. Some audio chip emulators are pretty damn good, the best thing you can get without having actual analog hardware in the loop. Not sure why you think samples are better.
240.
▲
by
exDM69
3y ago
Yes, llvmpipe or lavapipe is awesome. It is fully Vulkan 1.3 compliant and the performance is more than adequate for GUI apps, simple 3d apps or running your gfx tests in a CI environment without a GPU.
More ›