HNHacker News
TopNewBestAskShowJobs

Dwedit

4,716 karma · joined April 4, 2022

submissionscomments
Dwedit··on The Browser's Main Thread Is Expensive
What does "Browser's Main Thread" even mean when there are over 30 processes running?
Dwedit··on Google Has Removed MV2 Extensions from the Chrome Web Store, Including UBO
Brave Browser offers "Brave-hosted" versions of uBlock Origin and uMatrix.
Dwedit··on An implementation of Conway's Game of Life for Windows 3.1x and later
What about Win32s? Then the same binary can run on Windows 3.1 and Windows 11.
Dwedit··on Indirect Calling of Nested Functions on GCC Without Executable Stack
C# does closures by creating a class. When you run the function, captured local variables actually live inside the object instead of in the stack. This makes use of an object, but no memory pages need to become read/write/executable to make C#-style closures happen. You just have a combination function/object pointer (a delegate) instead of a single function pointer.
Dwedit··on Indirect Calling of Nested Functions on GCC Without Executable Stack
What do you need the executable stack for? You call using a function pointer, there's no executable read/write memory involved in using a function pointer.
Dwedit··on Serve Markdown to AI Agents with Accept Headers
How about allowing browsers to actually display markdown?
Dwedit··on Qwen3.8-Flash-Next
That's the nice thing about LLMs, you're always absolutely right.
Dwedit··on Show HN: How much of Hacker News is about AI?
The topic of an article being AI and an "AI-Generated Article" are two completely different things.
Dwedit··on HelloAssembly: The smallest possible complete Windows application (2021)
Many many different ways to allocate memory. malloc, new, HeapAlloc, LocalAlloc, GlobalAlloc, CoTaskMemAlloc, etc. GlobalAlloc and LocalAlloc are pretty much obsolete. "malloc" sometimes redirects to HeapAlloc with the default process heap, but only sometimes, it depends entirely on which compiler and CRT is used.

It just causes one big headache that a DLL can't simply return a pointer and have the caller use "free", because malloc/free can be incompatible across modules.

This just led to the COM standard, featuring reference-counted objects that don't care what underlying way was used to allocate the memory. For the situations where you do need memory buffers, COM enforces the use of CoTaskMemAlloc/CoTaskMemFree.

Dwedit··on Firefox 157 will include JPEG XL by default on all platforms
Lossless Webp is still very good, and it decompresses very quickly. Lossless JXL compresses better, but decompresses much more slowly. Lossless AVIF is a joke.
Dwedit··on HelloAssembly: The smallest possible complete Windows application (2021)
Then you load User32.dll, and you get 2MB of commit and 1MB of private bytes. Throw in a Message Box, and it's 272KB more private bytes and 388K more commit.

Windows 10 makes it literally impossible to write something that uses low memory and uses an actual window.

Dwedit··on HelloAssembly: The smallest possible complete Windows application (2021)
I made my own 64-byte MS-DOS stub that uses a shorter message "Win32 Only!" instead of the usual "This program can only be run in DOS mode" message. By using the shorter stub, using the secret flag to omit the Rich header, and possibly merging sections together, I can usually get the PE header to fit within 512 bytes, and the linker won't pad out the PE header to 1024 bytes.

A copy can be found at https://github.com/Dwedit/NoCopilotKey/blob/main/stub.bin

Dwedit··on A website for debloated open source alternatives
I've worked with C compilers that refused the // style before.
Dwedit··on MartyPC is a cross-platform emulator of early PCs written in Rust
Key is Scancode 0x2B, or as a VKEY code: VK_OEM_5 (0xDC)

Javascript says the key I pressed was keycode 220 (same number as 0xDC) or key "\".

I had Tandy 1000 as the selected machine. When I look at the onscreen keyboard, I don't see a backslash key underneath backspace, but I do see one next to left shift. For keyboards that have the alternate backslash there, it is listed as having a scancode of 0x56 and a VKEY code of VK_OEM_102 (0xE2). (I haven't actually checked information specific to the actual Tandy keyboard)

Dwedit··on MartyPC is a cross-platform emulator of early PCs written in Rust
This is about early IBM PCs, not apple computers. And the non-working key is the Backslash key \ , not the backspace key.
Dwedit··on The End of an Athlon
Pentium 4 had lids. AMD Athlon XP did not.
Dwedit··on MartyPC is a cross-platform emulator of early PCs written in Rust
Mysteriously, backslash has been mapped to backspace for some reason.
Dwedit··on Yes/No/Cancel causes Aspirin sales to soar (2007)
I mean I don't bother reading the dialogs. If there's modifications, "Yes" means save, "No" means close the program without saving, and "Cancel" means go back. And almost every program agrees on that convention, so you don't need to read the dialogs.
Dwedit··on Yes/No/Cancel causes Aspirin sales to soar (2007)
Rip John C. Dvorak, writer of the Abort/Retry/Fail column from PC Magazine.

On a different note, never underestimate the value of a modal dialog that gives you a chance to retry an IO operation that failed. Loose USB cables and network shares over Wifi can make those happen a lot more often.

Dwedit··on HTML Can Do That
Grouped Details example really needs a hand cursor. An "I" cursor for selecting text doesn't tell you that an element is interactible.
Dwedit··on A spectre is haunting Unicode
Saw headline, expected branch prediction vulnerability involving Unicode, was surprised at a completely different topic.
Dwedit··on I close SSH port 22 (and what I use instead)
I had to do this once. SSH server needed to run on port 443 because the clients had a locked down network firewall and could only make connections to particular port numbers.
Dwedit··on Every Fucking Website (2020)
Or even better, something that pretends to be a real "Sign in with Google" button but instead phishes your username and password.
Dwedit··on uBlock Origin Is Giving Up the Fight to Keep Ads Off Facebook
Would probably need a full userscript at this point?
Dwedit··on To save C, we must save ABI (2022)
Inline assembly is inline. You're not following the platform ABI's calling convention here, you are choosing input registers, output registers, and trashed registers right there. Following the platform's ABI and carrying out the function call has a cost, merely picking registers does not.
Dwedit··on Windows 11's built-in Weather app wastes more than 1 GB of RAM
This is what happens when you start a separate instance of Chromium everywhere.
Dwedit··on Gateway 2000's hilariously bad ads in the 90s (Part II)
For DOS, your choices are basically DJGPP C compiler, or using the HXDOS DOS extender. But how well would Cave Story work on 50MHz?
Dwedit··on Microsoft Edge is about to lock out older ad blockers, just like Chrome did
Until 2023, Edge was sending every URL you visited to bingapis.com.

Microsoft's current privacy statement also says "Depending on your settings, this browsing history is sent to Microsoft"

Dwedit··on Thoroughly Understanding C++ ABI (2024)
C++ ABIs are why Win32 settled on things like COM to do cross-module passing of objects. Because nobody could agree on a standard, the COM standard enforced a very specific calling convention, and a very specific vtable layout for COM objects.
Dwedit··on AI psychosis is the new leadership blind spot
Would exposing people to an obviously hallucinating AI help people here? Then they won't blindly trust it so much.
← PreviousPage 3 of 34Next →