frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

I Fixed Windows Native Development

https://marler8997.github.io/blog/fixed-windows/
177•deevus•3h ago

Comments

criemen•1h ago
This is amazing.

At $workplace, we have a script that extracts a toolchain from a GitHub actions windows runner, packages it up, stuffs it into git LFS, which is then pulled by bazel as C++ toolchain.

This is the more scalable way, and I assume it could still somewhat easily be integrated into a bazel build.

dgxyz•1h ago
Keeping CI entirely out of windows desktop development is the biggest efficiency and cost improvement I've seen in the last 15 years. Our CI toolchain broke so we moved back to a release manager doing it manually. It takes him 20x less time to build it and distribute it (scripted) than it does to maintain the CI pipeline and his desktop machine is several times faster than any cloud CI node we can get hold of.

Edit: Uses a shit load less actual energy than full-building a product thousands of times that never gets run.

dgxyz•1h ago
This is harder than what I do. Just install LTSC Visual Studio build tools from [1], then chuck this in a cmd file:

    cl yourprogram.c /link user32.lib advapi32.lib ... etc etc ...
I've built a load of utilities that do that just fine. I use vim as an editor.

The Visual Studio toolchain does have LTSC and stable releases - no one seems to know about them though. see: https://learn.microsoft.com/en-gb/visualstudio/releases/2022... - you should use these if you are not a single developer and have to collaborate with people. Back like in the old days when we had pinned versions of the toolchain across whole company.

[1] https://download.visualstudio.microsoft.com/download/pr/5d23...

aleph_minus_one•1h ago
> The Visual Studio toolchain does have LTSC and stable releases - no one seems to know about them though.

You only get access to the LTSC channel if you have a license for at least Visual Studio Professional (Community won't do it); so a lot of hobbyist programmers and students are not aware of it.

On the other hand, their existence is in my experience very well-known among people who use Visual Studio for work at some company.

dgxyz•1h ago
You can install the LTSC toolchain without a license. Just not the IDE.
foepys•42m ago
That's not correct. You don't have to give your credit card details or even be logged in but you are still required to have any Visual Studio license. For hobbyists and startups the VS Community license is enough but larger companies need a VS Professional license even for the VS Build Tools.

How strict Microsoft is with enforcement of this license is another story.

dgxyz•33m ago
Fair. Although I tend not to give a crap about Microsoft licensing :)
okanat•21m ago
Well, let's say this is the world view of all companies about open-source software. Then what happens. If people "tend to not give crap" about licenses, all the nice guarantees of GPL etc also disappear.
jen20•1h ago
This is a serious quality of life improvement for people forced to deal with Windows! Great job.
reactordev•1h ago
And here I was messing with MingW64…

This is fantastic and someone at Microslop should take notes.

Borg3•1h ago
Exacly.. I avoid Visual Studio.. I try to build everthing using Mingw..
xvilka•58m ago
Clang is the better alternative to MinGW because it can use standard Windows libraries and avoids the need for additional runtime.
reactordev•45m ago
Just msys2 it all
delta_p_delta_x•35m ago
MSYS2 is horrible. It brings a massive runtime environment and is a bad idea to foist on users.
dwroberts•29m ago
Can you actually do cross compilation (on Linux host to win64 binary) with clang in the same way as MingW does out of the box though?
okanat•13m ago
No. You cannot even do direct compilation on the same host and target with clang only.

LLVM doesn't come with the C library headers (VCRuntime) or the executable runtime startup code (VCStartup).Both of which are under Visual Studio proprietary licenses. So to use Clang on Windows without Mingw, you need Visual Studio.

jezek2•14m ago
I use MingW without any extra libs (no msys), it just uses the ancient msvcrt.dll that is present in all Windows versions, so my programs work even on Windows 2000.

Additionally the cross-compiler on Linux also produces binaries with no extra runtime requirements.

okanat•8m ago
You can use Mingw-w64 UCRT or CLANG environments that come with MSYS2.

Compared to older Mingw64 environments those link with the latest UCRT so you get almost the same style executable as Visual Studio.

The only difference for C is that it uses Mingw exception handling and global initialization code, and it uses Itanium ABI for C++.

pjmlp•1h ago
It starts by not looking into Windows through UNIX developer glasses.

The only issue currently plaguing Windows development is the mess with WinUI and WinAppSDK since Project Reunion, however they are relatively easy to ignore.

dgxyz•1h ago
Yes. Any user interface toolkit that isn't at least 10 years old should be ignored on windows unless you want to rewrite everything one day.
glimshe•1h ago
I wonder if people still use WinForms, MFC and WPF...
dgxyz•1h ago
We still use win32!

(granted we made our own MFC around it)

shigawire•1h ago
Still migrating an enterprise app off WPF to this day.
dgxyz•56m ago
What are you moving to out of interest? I’ve seen people talking of moving ours to Electron which seems to just be more problems waiting.
pjmlp•55m ago
They certainly do.
viraptor•1h ago
Why? You may end up with something that doesn't get much attention anymore, but none of the official gui approaches have ever been removed as far as I know. Win32, MFC, winforms, wpf, winui, maui are all still available and apps using them are functional. Even winjs still works apparently, even if it was handed over.

I wouldn't start an app in most of them today, but I wouldn't rewrite one either without a good reason.

dgxyz•58m ago
Well a number of them have horrific bugs in them which have zero attention. At least win32 has an abstraction level which allows you to work around them.

There’s a fun bug on WPF and form backgrounds for example which means on fractional DPI screens the background is tiled unpredictably. Had to patch that one up rather quickly one day and it was a mess due to how damn complicated WPF is.

jasode•50m ago
>It starts by not looking into Windows through UNIX developer glasses.

People don't need any UNIX biases to just want multiple versions of MSVS to work the way Microsoft advertises. For example, with every new version of Visual Studio, Microsoft always says you can install it side-by-side with an older version.

But every time, the new version of VS has a bug in the install somewhere that changes something that breaks old projects. It doesn't break for everybody or for all projects but it's always a recurring bug report with new versions. VS2019 broke something in existing VS2017 installs. VS2022 broke something in VS2019. etc.

The "side-by-side-installs-is-supposed-to-work-but-sometimes-doesn't" tradition continues with the latest VS2026 breaking something in VS2022. E.g. https://github.com/dotnet/sdk/issues/51796

I once installed VS2019 side-by-side with VS2017 and when I used VS2017 to re-open a VS2017 WinForms project, it had red squiggly lines in the editor when viewing cs files and the build failed. I now just install different versions of MSVS in totally separate virtual machines to avoid problems.

I predict that a future version VS2030 will have install bugs that breaks VS2026. The underlying issue that causes side-by-side bugs to re-appear is that MSVS installs are integrated very deeply into Windows. Puts files in c:\windows\system32, etc. (And sometimes you also get the random breakage with mismatched MSVCRT???.DLL files) To avoid future bugs, Microsoft would have to re-architect how MSVS works -- or "containerize" it to isolate it more.

In contrast, gcc/clang can have more isolation without each version interfering with each other.

I'm not arguing this thread's msvcup.exe tool is necessary but I understand the motivations to make MSVS less fragile and more predictable.

torginus•36m ago
Note that this also doesn't work on Linux - your system's package manager probably has no idea how to install and handle having multiple versions of packages and headers.

That's why docker build environments are a thing - even on Windows.

Build scripts are complex, and even though I'm pretty sure VS offers pretty good support for having multiple SDK versions at the same time (that I've used), it only takes a single script that wasn't written with versioning in mind, to break the whole build.

skissane•27m ago
> Note that this also doesn't work on Linux - your system's package manager probably has no idea how to install and handle having multiple versions of packages and headers.

But this isn’t true. Many distros package major versions of GCC/LLVM as separate packages, so you install and use more than one version in parallel, no Docker/etc required

It can indeed be true for some things-such as the C library-but often not for the compilers

torginus•2m ago
The closest thing I saw to this was some vendors shipping their SDKs with half the desktop userland (in a similar 'blob' fashion the post complains about), with shell scripts setting up paths so that their libs and tools are found before system ones.
pjmlp•2m ago
Until the day there is that symlink, or environment variable with the incorrect value.
rzr•1h ago
next, wrap it with wine and eventually share a bottle/winetrick
NSUserDefaults•1h ago
So this fixes the problem when msvc is the required compiler. Does the zig C++ compiler bring anything to the table when clang is an option?
feverzsj•1h ago
You still need headers and libraries that ship with MSVC.
eptcyka•1h ago
Is this even legal?
6581•1h ago
> No Visual Studio installation. No GUI. No prayer. Just a script that does exactly what it says.
never_inline•1h ago
Yeah its obvious clanker writing. I don't even mind using LLM for code but this rubs the wrong way.
Philpax•1h ago
At the risk of being that guy, I haven't had any issues onboarding people onto native projects written in Rust. rustup does a great job of fetching the required toolchains without issue. I'd imagine the same is also true of Go or Zig.
the__alchemist•1h ago
You have to do this for certain rust things too. I can't remember which, but I inevitably run into a need to install the MSVC toolchain to compile rust. I think it might be related to FFI, or libs which use FFI? The same thing comes up in Linux, but the process to install it is different.

I got anxiety reading the article, describing exactly why it sucks. It's nice to know from the article and comments here there are ways around it, but the way I have been doing it was the "hope I check the right checkboxes and wait a few hours" plan. There is usually one "super checkbox" that will do the right things.

I have to do this once per OS [re]install generally.

ww520•45m ago
Before rustup can run, the very first message rustup-init spits out is asking to install the visual studio tool chain.
g947o•38m ago
I'm pretty people who write and build C++ on Windows do it for good reasons, often reasons that are out of their control. Your comment is not going to make any difference.
ewuhic•1h ago
Nix on Windows when...
xvilka•1h ago
Please add also the support for the clang-cl[1][2].

[1] https://clang.llvm.org/docs/MSVCCompatibility.html

[2] https://clang.llvm.org/docs/UsersManual.html#clang-cl

__alexander•50m ago
Another option is explore winget and chocolaty. Most build tools and compilers can be installed via the command line on windows. Ask your favorite LLM to create a powershell script to install them all.
its_notjack•48m ago
Is this post AI-written? The repeated lists with highlighted key points, the "it's not just [x], but [y]" and "no [a] just [b]" scream LLM to me. It would be good to know how much of this post and this project was human-built.
evanjrowley•20m ago
Perhaps people have mimicked the style because LLMs have popularized it and clearly it serves some benefit to readers.
mkoubaa•15m ago
Life imitates art, even when that art is slop
esseph•19m ago
> Is this post AI-written?

What if it was?

What if it wasn't?

What if you never find out definitely?

Do you wonder that about all content?

If so, doesn't that get exhausting?

efilife•8m ago
I'm so fucking tired of this
botusaurus•6m ago
you know why LLMs repeat those patterns so much? because that's how real humans speak
g947o•47m ago
* Is this allowed per VS' ToS?

* I wonder if Microsoft intentionally doesn't provide this first party to force everyone to install VS, especially the professional/enterprise versions. One could imagine that we'd have a vsproject.toml file similar to pyproject.toml that just does everything when combined with a minimal command line tool. But that doesn't exist for some reason.

Uvix•25m ago
Visual Studio does have that functionality, via vsconfig files: https://learn.microsoft.com/en-us/visualstudio/install/impor...
g947o•22m ago
Doesn't look like it's versioned, or installs Visual Studio itself.
BearOso•20m ago
Microsoft doesn't seem to care unless you're a company. That's the reason community edition is free. Individual licenses would be pennies to them, and they gain more than that by having a new person making things in their ecosystem. It's in their interest to make their platform accessible as possible.
thrownaway561•40m ago
I'm just asking, but is there really a need for a native programs anymore? Where I worked a decade ago, we started porting all our native programs over to the browser and this was when MVC beta was just being released. At this point with Electron and Tauri, is there even a need to write a native program

Now with AI, I would think that porting a native program to the browser wouldn't be the chore it once was.

PlatoIsADisease•33m ago
I use COM and DLLs to extend software/automate. Using Visual Studio gives me some really nice debugging options.

I did try using python and js but the variable explorer is garbage due to 'late binding'.

I thought this was just my ignorance, but I've asked experts, AI, and google searched and they unfortunately agree. That said, some people have created their own log/prints so they don't need to deal with it.

well_ackshually•16m ago
> is there really a need for a native programs anymore

As long as you don't give a shit about the fact that your baseline memory consumption is now 500MB instead of 25MB, and that 80% of your CPU time is wasted on running javascript through a JIT and rendering HTML instead of doing logic, no.

If you don't give a shit about your users or their time, there's indeed no longer a need to write native programs.

botusaurus•3m ago
what if caring about users means giving them features instead of fighting with obsolete unproductive native GUI frameworks

funny how Electron apps tend to have many more users than their native "performant" counterparts, isn't it?

MomsAVoxell•9m ago
Yes, very definitely. There has always been a need for high performance native applications. Even in the beginning of the desktop computing revolution, these questions have been asked .. and yes, there is a balance between native and cloud/browser-based computing - some of it is personal, much of it is industrial and corporate, and yet more of the spectrum where both methods are applicable exists, even still, decades later.
ww520•37m ago
I was just setting up a new machine and was setting up the Rust environment. The very first thing rustup-init asked was to install Visual Studio before proceeding. It was like 20-30gb of stuff installed before moving forward.

This tool would be a great help if I knew beforehand.

jjkaczor•33m ago
While this is great - Visual Studio installer has a set of "command-line parameters" for unattended installs.

You can then build a script/documentation that isolates your specific requirements and workloads:

https://learn.microsoft.com/en-us/visualstudio/install/use-c...

Had to do this back in 2018, because I worked with a client with no direct internet access on it's DEV/build machines (and even when there was connectivity it was over traditional slow/low-latency satellite connections), so part of the process was also to build an offline install package.

PlatoIsADisease•32m ago
I havent run into this problem yet... but my oldest .net software is only 1 year old... Is this something that happens over the course of a few years?
torginus•32m ago
What we did for out build agents was to just install the required version of build tools via chocolatey. But cool approach!
MomsAVoxell•13m ago
Same. Choco solves this with a one-liner for me.
ivanjermakov•25m ago
One day I decided to port my text editor to Windows. Since it depends on pcre2 and treesitter, these two libraries had to be provided by the system.

In the span of ~2hrs I didn't manage to find a way to please Zig compiler to notice "system" libraries to link against.

Perhaps I'm too spoiled by installing a system wide dependency in a single command. Or Windows took a wrong turn a couple of decades ago and is very hostile to both developers and regular users.

lmz•5m ago
If you depend on a library and can't figure out how you would compile against it, it's probably better for the end user that you don't make anything because you'll still need to package it up later unless you link statically.
jevinskie•20m ago
Were you around before the new installer came out? It was light speed compared to what was before!
droelf•15m ago
Thank you, this might be a great way to improve the developer experience in the conda/conda-forge ecosystem.
jordand•14m ago
For big C++ projects, the .vsconfig import/export way of handling Visual Studio components has worked well for the large teams I'm on. Tell someone to import a .vsconfig and the Visual Studio Installer does everything. Only times we've had issues is from forgetting to update it with components/SDK changes.
tgtweak•14m ago
Toolchains on linux are not clear from dependency hell either - ever install an npm package that needs cmake underneath? glibc dependencies that can't be resolved because you need two different versions simultaneously in the same build somehow... python in another realm here as well. That shiny c++ project that needs a bleeding edge boost version that is about 6 months away from being included in your package manager. Remember patching openSSL when heartbleed came around (libssHELL).

Visual studio is a dog but at least it's one dog - the real hell on windows is .net framework. The sheer incongruency of what version of windows has which version of .net framework installed and which version of .net your app will run in when launched... the actual solution at scale for universal windows compatibility on your .net app is to build a c++ shim that checks for .net beforehand and executes it with the correct version in the event of multiple version conflict - you can literally have 5 fully unique runtimes sharing the same .net target.

giancarlostoro•7m ago
I went from POP OS (Ubuntu) to EndeavourOS (Arch) Linux because some random software with an appimage or whatever refused to run with Ubuntus “latest” GLIBC and it ticked me off, I just want to run more modern tooling, havent had any software I couldnt just run on Arch, going on over a year now.
mkoubaa•13m ago
Say what you want about coding agents, when the cost of writing code goes to near-zero, the cost of wrangling tools becomes a much bigger fraction of development effort. This is an amazing opportunity to address long-standing frictions.
claimred•11m ago
Perhaps winget is enough?

winget install Microsoft.VisualStudio.2022.BuildTools

debugnik•7m ago
The Build Tools installer first installs the Visual Studio tool to select the workloads you want as well.
evanjrowley•10m ago
Alternatively, there's this:

Install Visual Studio Build Tools into a container to support a consistent build system | Microsoft Learn

https://learn.microsoft.com/en-us/visualstudio/install/build...

jezek2•8m ago
I wish open source projects would support MingW or at least not actively blocking it's usage. It's a good compiler that provides an excellent compatibility without the need of any extra runtime DLLs.

I don't understand how open source projects can insist on requiring a proprietary compiler.

I Fixed Windows Native Development

https://marler8997.github.io/blog/fixed-windows/
182•deevus•3h ago•79 comments

I love the work of the ArchWiki maintainers

https://k7r.eu/i-love-the-work-of-the-archwiki-maintainers/
638•panic•13h ago•111 comments

Flashpoint Archive – Over 200k web games and animations preserved

https://flashpointarchive.org
203•helloplanets•8h ago•46 comments

Show HN: Perlin Noise Terminal Animation in Rust (60 FPS, Truecolor)

https://github.com/denisepattenson/perlin-terminal
14•denisepattenson•1h ago•5 comments

Amazon, Google Unwittingly Reveal the Severity of the U.S. Surveillance State

https://greenwald.substack.com/p/amazons-ring-and-googles-nest-unwittingly
103•mikece•1h ago•21 comments

Reversed engineered game Starflight (1986)

https://github.com/s-macke/starflight-reverse
17•tosh•2h ago•3 comments

RynnBrain

https://github.com/alibaba-damo-academy/RynnBrain
13•jsemrau•4d ago•0 comments

My smart sleep mask broadcasts users' brainwaves to an open MQTT broker

https://aimilios.bearblog.dev/reverse-engineering-sleep-mask/
513•minimalthinker•22h ago•225 comments

Oat – Ultra-lightweight, semantic, zero-dependency HTML UI component library

https://oat.ink/
190•twapi•6h ago•51 comments

Constraint Propagation for Fun

https://eli.li/constraint-propagation-for-fun
21•rickcarlino•4d ago•0 comments

A practical guide to observing the night sky for real skies and real equipment

https://stargazingbuddy.com/
57•constantinum•2d ago•6 comments

A Pokémon of a Different Color

https://matthew.verive.me/blog/color/
18•Risse•3h ago•4 comments

Interference Pattern Formed in a Finger Gap Is Not Single Slit Diffraction

https://note.com/hydraenids/n/nbe89030deaba
64•uolmir•2d ago•9 comments

Zvec: A lightweight, fast, in-process vector database

https://github.com/alibaba/zvec
180•dvrp•2d ago•31 comments

Instagram's URL Blackhole

https://medium.com/@shredlife/instagrams-url-blackhole-c1733e081664
246•tkp-415•1d ago•40 comments

uBlock filter list to hide all YouTube Shorts

https://github.com/i5heu/ublock-hide-yt-shorts/
995•i5heu•20h ago•293 comments

Two different tricks for fast LLM inference

https://www.seangoedecke.com/fast-llm-inference/
87•swah•5h ago•41 comments

5,300-year-old 'bow drill' rewrites story of ancient Egyptian tools

https://www.ncl.ac.uk/press/articles/latest/2026/02/ancientegyptiandrillbit/
141•geox•4d ago•50 comments

DjVu and its connection to Deep Learning (2023)

https://scottlocklin.wordpress.com/2023/05/31/djvu-and-its-connection-to-deep-learning/
15•tosh•5h ago•2 comments

Show HN: Copy-and-patch compiler for hard real-time Python

https://github.com/Nonannet/copapy
24•Saloc•4d ago•2 comments

Guitars of the USSR and the Jolana Special in Azerbaijani Music (2012)

https://caucascapades.wordpress.com/2012/06/14/guitars-of-the-ussr-and-the-jolana-special-in-azer...
67•bpierre•11h ago•10 comments

Inspecting the Source of Go Modules

https://words.filippo.io/go-source/
33•todsacerdoti•2d ago•16 comments

Amsterdam Compiler Kit

https://github.com/davidgiven/ack
142•andsoitis•21h ago•50 comments

News publishers limit Internet Archive access due to AI scraping concerns

https://www.niemanlab.org/2026/01/news-publishers-limit-internet-archive-access-due-to-ai-scrapin...
525•ninjagoo•19h ago•324 comments

OpenAI should build Slack

https://www.latent.space/p/ainews-why-openai-should-build-slack
198•swyx•1d ago•234 comments

How often do full-body MRIs find cancer?

https://www.usatoday.com/story/life/health-wellness/2026/02/11/full-body-mris-cancer-aneurysm/883...
134•brandonb•1d ago•188 comments

A Visual Source for Shakespeare's 'Tempest'

https://profadamroberts.substack.com/p/a-visual-source-for-shakespeares
18•seegodanddie•3d ago•0 comments

Breaking the spell of vibe coding

https://www.fast.ai/posts/2026-01-28-dark-flow/
329•arjunbanker•1d ago•239 comments

Discord Distances Itself from Peter Thiel's Palantir Age Verification Firm

https://kotaku.com/discord-palantir-peter-thiel-persona-age-verification-2000668951
142•thisislife2•8h ago•84 comments

Ooh.directory: a place to find good blogs that interest you

https://ooh.directory/
553•hisamafahri•1d ago•134 comments