HNHacker News
TopNewBestAskShowJobs

delta_p_delta_x

5,063 karma · joined July 15, 2021

submissionscomments
delta_p_delta_x··on What are locusts and what happened to them?
> a phenomenon where a single genotype produces distinct phenotypes

Ah, so like how Wurmple may evolve into Silcoon or Cascoon and thence Beautifly or Dustox. Cool.

delta_p_delta_x··on Citing 'severe' math deficits, UC faculty demand a return to SAT tests for STEM
> I tried live latexing my math courses

This was by far the biggest time sink in my maths courses, and frankly, a giant waste of time. Sure, the end result looked beautiful but I think I understood less of it than if I'd just written it all down on A4 ruled paper in gel pen.

delta_p_delta_x··on Citing 'severe' math deficits, UC faculty demand a return to SAT tests for STEM
> making high schoolers write all their coursework by hand

You make this sound like it is some long-gone practice. I was writing maths by hand as recently as 2020 in university, for my CS-associated maths courses (linear algebra, calculus, physics for computer graphics, etc).

In pre-university essentially all coursework was done by hand, and the national exams are all still handwritten.

delta_p_delta_x··on No more JetBrains products for me
VS and JetBrains IDEs have very good sane defaults. They're usable out of the box. In VS I load a .sln file, or a project containing CMakeLists.txt, press F5, and I am debugging with a full-fledged data structure visualisation, CPU and heap profiling, and I can even add in time-travel debugging with a couple of clicks.

I have to manually set all of this up in Vim or Emacs, and frankly the debugging experience in GDB or LLDB is worse than it really ought to be. People actually need to use good tools to understand how nice things can be.

delta_p_delta_x··on Zero-native – Build native desktop apps with web UI
Tiny nitpick: Windows Forms wraps the Windows API; the function call is `CreateWindowEx`[1].

[1]: https://github.com/dotnet/winforms/blob/27e7cb2e5043780dd75e...

delta_p_delta_x··on Zero-native – Build native desktop apps with web UI
> Native apps on Windows look crap to me (without even mentioning the advanced fragmentation in UI toolkits in Windows).

WinUI 3 is pretty decent. Have a look at first-party programs like PowerToys[1], or Windows Terminal[2].

[1]: https://github.com/microsoft/PowerToys

[2]: https://github.com/microsoft/terminal

delta_p_delta_x··on Screenshots of Old Desktop OSes
> These things are objectively better on a modern KDE linux

They are not.

I use a KDE distribution at work. I regularly see GPU texture copy bugs like random lines across the middle of the display, or along the bottom edge. I use a 4K 144 Hz 16:9 display, and the Linux platform absolutely struggles with getting the scaling, resolution, and colour depth on all the dozens of GUI toolkits correct. Subpixel antialiasing doesn't work on many applications. It doesn't matter if I am using Wayland or X; both are bad experiences.

> dual-Sonos / Airpod setup by... clicking the sound icon

Speaking of sound... Linux doesn't even pick up my Audient interface unless I physically reinsert the USB cable. It doesn't have a channel or volume control for audio feedback from my mic to my outputs. If I change the output volume slider down from 100%, the actual volume output is asymmetric—one channel is considerably louder than the other at 50%.

I have experienced issues with wpa_supplicant, iwd/iwctl, and systemd-networkd fighting each other. Why are there even so many network managers? Why does the platform not provide one?

I will disagree until the cows come home that any Linux desktop interface (again, bar Android... but like I said, Android is almost an entirely different platform) is less jank than Windows. People bring up Windows' old UIs, but said UIs still work. gpedit.exe, regedit.exe, msc.exe, services.exe, ncpa.cpl, perfmon.exe, windbg.exe, these are things that haven't changed in nearly 3 decades.

delta_p_delta_x··on Screenshots of Old Desktop OSes
I'm currently running Windows 10 Enterprise with a volume key from my alma mater. When I eventually upgrade to 11, either Server or LTSC is on my radar.
delta_p_delta_x··on Screenshots of Old Desktop OSes
Cheers. Some of the themes look pretty good! I used to use StarDock Start and StartIsBack back when I was using Windows 8 to, well, get the Windows 7 Aero theme and the start menu back.

That being said I do notice that many of the rounded corners aren't fully transparent...

delta_p_delta_x··on Screenshots of Old Desktop OSes
No thanks, I do not want Linux. I use Linux for my home servers and at work, and I'd like to keep it that way, at arm's length.

I don't know why people suggest Linux for desktop use at the first swoop. I dislike it. I dislike how janky its various GUI desktop managers are, I dislike how edge cases that are handled straightforwardly on Windows just aren't on Linux. Things like high pixel density, different audio setups, multi-touch trackpad support, notebook battery life management, and more. The bazaar thing contributes to all of these sharp edges and jank.

And more importantly I dislike the sanctimony of the Linux community, I dislike the distribution and the linking model of most desktop distributions, I dislike how it is 'developers first' and not 'users first', unless a giant entity rewrites the entire user mode stack to provide a useful, straightforward, and mostly intuitive platform interface (that is, Android).

An OS is more than the kernel. It is the entire platform including user-mode libraries, toolkits, and applications. For all its faults, I find the Windows platform better than any Linux distro platform, except one.

> Hardware features are contained in the kernel. GUI has nothing to do with them.

What I listed aren't only hardware features; they are platform interfaces that can be programmed against to produce user-mode applications without having to muck around with kernel interfaces. In fact the less as a user or user-mode developer I have to work with the kernel, the better, and Windows provides a gigantic surface area for that.

I am happy with how Windows works, I like a Windows workflow, I like developing for and on Windows, I like gaming on Windows. I've used it for 26 years and broadly have no issues with it. It is a pretty superb platform which regressed after Windows 10, and about 99% of the problems with it are user-mode frameworks and applications, thin coats of paint. Windows isn't even close to 'beyond salvation'.

delta_p_delta_x··on Screenshots of Old Desktop OSes
I really wish Windows 11 had a Windows 2000 mode. I want a grey, boxy UI, but I also want al the modern technologies Windows has introduced since—DirectStorage, D3D12, fast SSDs, device-independent pixels and vector UIs, all written directly against a Windows API that is modernised, safe, and easy to use. No React, no ads in my weather app; the only browser on my computer will be the browser itself.
delta_p_delta_x··on Singapore introduces caning for boys who bully others at school
Your point being?
delta_p_delta_x··on Windows API is Successful Cross-Platform API (2024)
> To be fair, if you use only the Linux syscall interface, then a program that you compiled on x86 in the 90s will probably still run anywhere today. Linus is adamant about this.

This is frankly the opposite of how it should've been. Who cares that the kernel ABI doesn't change from release to release? As an end-user, I couldn't care less. Even as a developer I care very little indeed, because I'm not writing drivers. I'm almost never programming directly against the kernel's interface but rather using my language's standard library, which is already an abstraction over the kernel interface.

Platform vendors (this includes distro maintainers) should recompile and re-package libraries for each new ABI in each OS release, done. End-users won't ever notice, they can run their applications portably because the user-mode library ABIs haven't changed... Which is what Win32 has done, and what glibc has consistently failed to do.

delta_p_delta_x··on Windows API is Successful Cross-Platform API (2024)
> Hey, want to race to install toolchains?

Not the parent commenter. It's really not that hard.

MSVC: https://visualstudio.microsoft.com/downloads/?q=build+tools#...

Clang targeting MSVC ABI: https://github.com/llvm/llvm-project/releases/download/llvmo...

Clang targeting MinGW ABI: https://github.com/mstorsjo/llvm-mingw/releases/tag/20260421

GCC targeting MinGW ABI, running in MSYS2: https://github.com/msys2/msys2-installer/releases/download/2...

Or, if you want a command-line, winget makes it easier still:

  winget install -e --id Microsoft.VisualStudio.BuildTools LLVM.LLVM MartinStorsjo.LLVM-MinGW.UCRT BrechtSanders.WinLibs.MCF.UCRT
One-liner, roughly on par with `pacman -S base-devel clang llvm`. To install libraries, I use `vcpkg add port sdl2` in my project, a la cargo. No more fudging with system-level dependencies.
delta_p_delta_x··on Why are there both TMP and TEMP environment variables? (2015)
%LOCALAPPDATA% on Windows. Or better still, use GetAppContainerFolderPath or SHGetKnownFolderPath with FOLDERID_LocalAppData.
delta_p_delta_x··on Your hex editor should color-code bytes

  > Your hex editor should colour-code bytes so it is easier for users to distinguish patterns
  > Article is fully in lowercase, which makes it harder for readers to make out sentences and the flow of the article
  > mfw the irony
delta_p_delta_x··on RedSun: System user access on Win 11/10 and Server with the April 2026 Update
This is a misrepresentation. This command-line is the compiler invocation, and is not the equivalent to 'make' on Windows. The actual equivalent on Linux, in the same order of the arguments to cl.exe would be:

  cl /std:c++17 /EHsc /W4 /O2 /DUNICODE /D_UNICODE /wd4005 /Fe:RedSun.exe RedSun.cpp advapi32.lib ole32.lib user32.lib

  g++ -std=c++17 -Wall -O3 -DUNICODE -D_UNICODE -Wno-builtin-macro-redefined -o RedSun.exe RedSun.cpp -ladvapi -lole32 -luser32
I see no difference. One uses slash-demarcated arguments, the other uses hyphens. The g++ invocation is missing the flag for the exception handling model[1]. Otherwise, it is a matter of what you are used to. In fact, if you have MinGW, this exact command-line invocation will probably work correctly.

When you install the VS build tools you get nmake which processes most Makefiles just fine. Or you get a solution file, in which case you just open the solution in VS and press F5. Or if you are hung up about doing it in the command-line, it would be

  msbuild.exe foo.sln
Or with CMake, which has a cross-platform command-line,

  cmake --preset somepreset
Linux people who don't know Windows and complain that 'it looks like this' is my bugbear, when they can spend hours fixing a dumb in-tree driver with printf debugging that works plug-and-play on Windows.

[1]: https://learn.microsoft.com/en-gb/cpp/build/reference/eh-exc...

delta_p_delta_x··on Can Claude Fly a Plane?
> Don't think the autopilot can do that yet.

It absolutely can; it's called autoland[1]. In really bad visibility, pilots simply can't see the runway until too late, and most aerodromes which expect these conditions have some sort of autoland system installed. The most advanced ones will control every aspect of the plane from top-of-descent (TOD), flaps and throttle configuration, long and short final, gear down, flare, reverse thrust, and roll-out, all the way to a full stop on the runway. Zero pilot input needed.

And most of this was already available in the late 1970s. We have absolutely no need for LLM-based AI in aviation; traditional automation techniques have proven extremely powerful given how restricted the human domain of aviation already is.

[1]: https://en.wikipedia.org/wiki/Autoland

delta_p_delta_x··on Top laptops to use with FreeBSD
> now has hardware support that is miles ahead of Windows

[X] doubt.

delta_p_delta_x··on Show HN: I built a Cargo-like build tool for C/C++
Windows and Visual Studio solutions are perfectly fine. MSBuild is a declarative build syntax in XML, it's not very different from a makefile.
delta_p_delta_x··on Show HN: I built a Cargo-like build tool for C/C++
> most of the time CMAKE is just overkill and does not play well the compiler/binutils provided

You need to define a CMake toolchain[1] and pass it to CMake with --toolchain /path/to/file in the command-line, or in a preset file with the key `toolchainFile` in a CMake preset. I've compiled for QNX and ARM32 boards with CMake, no issues, but this needs to be done.

[1]: https://cmake.org/cmake/help/latest/manual/cmake-toolchains....

delta_p_delta_x··on Show HN: I built a Cargo-like build tool for C/C++
Agreed, xmake seems very well-thought-out, and supports the most modern use-cases (C++20 named modules, header unit modules, and `import std`, which CMake still has a lot of ceremony around). I should switch to it.
delta_p_delta_x··on Union types in C# 15
> terrible ecosystem

.NET is a fantastic ecosystem. Has a decent build and dependency system (NuGet, dotnet run/build, declarative builds in XML). Massive standard library, with a consistent and wide focus on correctness, ergonomics, and performance across the board.

You can write everything in many languages, all on the same runtime: business logic in C#; hot paths interfacing with native libraries in C++/CLI; shell wrappers in PowerShell, document attachments with VB, data pipelines in F#.

I feel more people should use it, or at least try it, but sadly it is saddled with the perception that it is Windows-only, which hasn't been true for a decade (also, IMO, not necessarily a negative, because Windows is a decent OS, sue me).

delta_p_delta_x··on Lunar Flyby
> $4 billion per launch

This is not a lot of money on a nation-state scale. It's equal to giving every person in the US about US$12.

delta_p_delta_x··on Use string views instead of passing std:wstring by const&
Or, set up the manifest in your app[1], and just use UTF-8 and `std::string`/`std::string_view` everywhere.

[1]: https://learn.microsoft.com/en-gb/windows/apps/design/global...

delta_p_delta_x··on Neanderthals survived on a knife's edge for 350k years
> Unfortunately, the Native Americans did not invent it quickly enough

This is false. Most native Americans throughout both continents—especially those in Mesoamerica—were powerful civilisations in their own right with plenty of agricultural history.

What finished many of them off was a lack of resistance to smallpox, which was brought over by the first explorers/colonists.

delta_p_delta_x··on Use string views instead of passing std:wstring by const&
I am very sceptical about that. Much safer and cleaner languages like ML and Lisp were contemporary to C, and were equally developed on memory-scarce hardware.
delta_p_delta_x··on Use string views instead of passing std:wstring by const&
> zero copy and zero allocations

This is a red herring, because when you actually read the strings out, you still need to iterate through the length for each string—zero copy, zero allocation, but linear complexity.

> query file size, allocate buffer once, read it into the buffer, drop some NULL's into strategic positions, maybe shuffle some bytes around for that rare escape case, and you have a whole bunch of C strings, ready to use, and with no length limits.

I write parsers in a very different way—I keep the file buffer around as read-only until the end of the pipeline, prepare string views into the buffer, and pipe those along to the next step.

delta_p_delta_x··on Use string views instead of passing std:wstring by const&
> C Strings at least let you take a zero copy substring of the tail

This is a special-case optimisation that I'm happy to lose in favour of the massive performance and security benefits otherwise.

Isn't length + pointer... Basically a Pascal string? Unless I am mistaken.

I think what was unsaid in your second point is that we really need to type-differentiate constant strings, dynamic strings, and string 'views', which Rust does in-language, and C++ does with the standard library. I prefer Rust's approach.

delta_p_delta_x··on Use string views instead of passing std:wstring by const&
The zero-terminated string is by far C's worst design decision. It is single-handedly the cause for most performance, correctness, and security bugs, including many high-profile CVEs. I really do wish Pascal strings had caught on earlier and platform/kernel APIs used it, instead of an unqualified pointer-to-char that then hides an O(n) string traversal (by the platform) to find the null byte.

There are then questions about the length prefix, with a simple solution: make this a platform-specific detail and use the machine word. 16-bit platforms get strings of length ~2^16, 32 b platforms get 2^32 (which is a 4 GB-long string, which is more than 1000× as long as the entire Lord of the Rings trilogy), 64 b platforms get 2^64 (which is ~10^19).

Edit: I think a lot of commenters are focusing on the 'Pascalness' of Pascal strings, which I was using as an umbrella terminology for length-prefixed strings.

← PreviousPage 6 of 34Next →