Recent submissions

Comment · 14 days ago
Yes, Docker is weird. We already have a process management thing - it is called an operating system. But processes are misbehaved sometimes. They are not configurable enough, what if two processes want to listen on port 80? What if two processes want to save stuff at /var/abc.txt? And so on. In this case Docker might have a point. Otherwise it is just saysadmin's lazyness.
Comment · 3 months ago
Wasn't there a problem with Alpha, that it had too weak memory model or something? Think of atomic instructions with multi CPU system. Or do I remember something wrong?
Comment · 6 months ago
Yes! I need a glass Klein bottle video!
Comment · 6 months ago
My idea is: 1) Determine how frequently you want to update the number on screen. Every frame is too often, once per second is too infrequent. Maybe 4× per second is OK. 2) Determine how much time to average over. One or two seconds seems fine. 3) From those two numbers, compute number of buckets. For example update 4× per second, average over 2 seconds, gives you 8 buckets. 4) Every time a frame is drawn, based on current time, you either a) increment the counter in the last bucket or b) shift all buckets over one position and increment the new last bucket from zero to one. 5) Average the sum of frames drawn over that time period you decided earlier. 6) Don't display fraction of a FPS. 7) Done. It costs you 8 integers, plus maybe one more for a timestamp of the last bucket, plus maybe one more to implement ring buffer instead of shifting all those integers over. Less than a single CPU cache line.
Comment · 8 months ago
Is there a way to have benefits of both? Version 7 for better database clustering. And version 4 for complete randomness? So users can not inference nothing from the id? I have an idea: Use version 7 internally, then scramble it before sending to the user. Scrambling could be done by the database or by the server application. It could be as simple as XOR with some 128bit constant, or as resilient as AES encryption. Of course you also need to do unscrambling of IDs coming from users.
Comment · 9 months ago
Comment · 1 year ago
As PDF supports DEFLATE compression, it should be possible to shrink the size of the PDF document considerably.
Comment · 1 year ago
Comment · 3 years ago
No, Windows has stable API and ABI named Win32 API. This comes from times of 16bit Windows and works also in x64 / ARM / ARM64, previously it worked in Alpha / MIPS / IA64. This API is implemented in kernel.dll user.dll gdi.dll advapi.dll and similar, it does some stuff, but mostly forwards to the NT API. Beware, kernel.dll is user space component despite its name (historical reasons). NT API is undocumented and not meant to be used by user programs, it is not stable, it lives in ntdll.dll, it does syscalls to the kernel: ntoskrnl.exe. Windows doesn't have a libc (for user programs, it has private one for its own programs), Visual Studio has a libc. Each version of Visual Studio (roughly) has its own libc named msvcrt.dll msvrt100.dll msvcrt140.dll and similar, it hosts the C and C++ libc, it could be linked statically for various benefits and drawbacks.
Comment · 3 years ago
> memory allocation can occur here and there

What about HW decoders? Of video formats (that are much more complex than image decoders)? Such as MPEG, H.264, H.265, VP9, AV1 and similar. If memory allocation is needed here and there, I guess there is always known maximum size of such allocation in advance. Written in the spec. Think of at chip design time, or at software decoder compile time. How else would HW decoders be even possible?

Also: Hey Google, do you even fuzz-test? Your own stuff?

Comment · 3 years ago
The article says that GLONASS time counts days from zero to 1461, then resets back to zero. This is 4 years if we think leap year is once 4 years. But it is not. Leap year is once 4 years, but each 100 years it is not, except each 400 years it is. This is on average 365.2425 days per year not 365.25 days per year. Is GLONASS not long term thinking ahead enough?
Comment · 3 years ago
What about NaN? Does Erlang have NaN? How does Erlang compare two variables containing a NaN (or expressions evaluating to a NaN)? There are (2^24)-2 different NaNs in a 32bit IEEE 754 float, and there are (2^53)-2 different NaNs in a 64bit IEEE 754 double. The IEEE 754 standard says, that a NaN value should compare to any other number (including any other NaN) as not equal. Yes, the expression `x == x` could return `false`.
Comment · 3 years ago
If you are administrator, you can create and launch new scheduled tasks ... as NT\SYSTEM from that you can ... anything. Get TCB privilege, get Trusted Installer account, install kernel level drivers ... god mode.
Comment · 4 years ago
Implementing AES from scratch is easy and fun, just read the spec and implement it 1:1, until ... you encounter GCM mode and its Galois Field "weird" math. Very. Not. Fun.
Comment · 5 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton